mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 11:24:08 +00:00
Merge pull request #5473 from raydf/devel
Only remove scheme when there's a TLS request ("https")
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user