mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
Fixes crash in httpclient due to new string indexing rules.
This commit is contained in:
@@ -749,7 +749,7 @@ proc generateHeaders(requestUrl: Uri, httpMethod: string,
|
||||
|
||||
if proxy.isNil or requestUrl.scheme == "https":
|
||||
# /path?query
|
||||
if requestUrl.path[0] != '/': result.add '/'
|
||||
if not requestUrl.path.startsWith("/"): result.add '/'
|
||||
result.add(requestUrl.path)
|
||||
if requestUrl.query.len > 0:
|
||||
result.add("?" & requestUrl.query)
|
||||
|
||||
Reference in New Issue
Block a user