summary refs log tree commit diff stats
path: root/lib/pure/httpclient.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-03-08 00:39:13 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-03-08 00:39:13 +0100
commit507feb3ce51d4d12b86c101e2c5bf4bbba441c82 (patch)
tree0ff608874f0841ffe3a3af96b7bcc19e8cf19b99 /lib/pure/httpclient.nim
parent91a4b448fdfb1a28e5bd1f1d5785e0308fedcb1a (diff)
parent7dc8dcb581a2de06472c35868504c7aafe69ca81 (diff)
downloadNim-507feb3ce51d4d12b86c101e2c5bf4bbba441c82.tar.gz
Merge branch 'devel' into faster-nimsuggest
Diffstat (limited to 'lib/pure/httpclient.nim')
-rw-r--r--lib/pure/httpclient.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 662e75471..7f666fb35 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -719,9 +719,9 @@ proc generateHeaders(requestUrl: Uri, httpMethod: string,
     if requestUrl.query.len > 0:
       result.add("?" & requestUrl.query)
   else:
-    # Remove the 'http://' from the URL for CONNECT requests.
+    # Remove the 'http://' from the URL for CONNECT requests for TLS connections.
     var modifiedUrl = requestUrl
-    modifiedUrl.scheme = ""
+    if requestUrl.scheme == "https": modifiedUrl.scheme = ""
     result.add($modifiedUrl)
 
   # HTTP/1.1\c\l