mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Fixed query and anchor during relative redirection
This commit is contained in:
@@ -540,6 +540,8 @@ proc getNewLocation(lastURL: string, headers: HttpHeaders): string =
|
||||
if r.hostname == "" and r.path != "":
|
||||
var parsed = parseUri(lastURL)
|
||||
parsed.path = r.path
|
||||
parsed.query = r.query
|
||||
parsed.anchor = r.anchor
|
||||
result = $parsed
|
||||
|
||||
proc get*(url: string, extraHeaders = "", maxRedirects = 5,
|
||||
|
||||
Reference in New Issue
Block a user