Fixed query and anchor during relative redirection

This commit is contained in:
Yuriy Glukhov
2017-01-20 12:59:13 +02:00
parent b2237678fb
commit 2f320fb286

View File

@@ -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,