Skip to content

Commit

Permalink
Merge pull request #5473 from raydf/devel
Browse files Browse the repository at this point in the history
Only remove scheme when there's a TLS request ("https")
  • Loading branch information
dom96 authored Mar 3, 2017
2 parents 5d125ca + d5d975c commit 52462f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pure/httpclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52462f0

Please sign in to comment.