The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/2220

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Testing the 1st example "talking over the socket", I got this error: curl: (35) gnutls_handshake() failed: An unexpected TLS packet was received. Because the url is pointing to the TCP and not the socket.
Testing the 2nd example "talking over TCP", I got these warnings:
      1-Warning: You can only select one HTTP request method! You asked for both POST
      2-Warning: (-d, --data) and HEAD (-I, --head).
With these changes both examples run without errors.
From 09eef6e1a4f15fa439bb3795a4718fc01ec2a8bc Mon Sep 17 00:00:00 2001
From: Elvis Espinal <elvisespi...@neoscloudllc.com>
Date: Wed, 20 Jul 2016 11:02:47 -0400
Subject: [PATCH] Fixed errors on api examples with curl

Testing the 1st example "talking over the socket", I got this error: curl: (35) 
gnutls_handshake() failed: An unexpected TLS packet was received. Because the 
url is pointing to the TCP and not the socket.
Testing the 2nd example "talking over TCP", I got these warnings:
      1-Warning: You can only select one HTTP request method! You asked for 
both POST
      2-Warning: (-d, --data) and HEAD (-I, --head).
With these changes both examples run without errors.
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 56599bf..54ad4a2 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ curl --unix-socket /var/lib/lxd/unix.socket \
     -H "Content-Type: application/json" \
     -X POST \
     -d @hello-ubuntu.json \
-    "https://127.0.0.1:8443/1.0/containers";
+    lxd/1.0/containers
 ```
 
 #### via TCP
@@ -46,7 +46,7 @@ TCP requires some additional configuration and is not enabled 
by default.
 lxc config set core.https_address "[::]:8443"
 ```
 ```bash
-curl -k -L -I \
+curl -k -L \
     --cert ~/.config/lxc/client.crt \
     --key ~/.config/lxc/client.key \
     -H "Content-Type: application/json" \
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to