fix bug in handling relative redirects

This commit is contained in:
Adam D. Ruppe 2021-02-26 15:31:20 -05:00
parent a7d5c43c51
commit a828c84939
1 changed files with 4 additions and 1 deletions

View File

@ -724,13 +724,16 @@ class HttpRequest {
this.cache = cache; this.cache = cache;
} }
private Uri where;
private ICache cache; private ICache cache;
/// Final url after any redirections /// Final url after any redirections
string finalUrl; string finalUrl;
void populateFromInfo(Uri where, HttpVerb method) { void populateFromInfo(Uri where, HttpVerb method) {
auto parts = where; auto parts = where.basedOn(this.where);
this.where = parts;
finalUrl = where.toString(); finalUrl = where.toString();
requestParameters.method = method; requestParameters.method = method;
requestParameters.unixSocketPath = where.unixSocketPath; requestParameters.unixSocketPath = where.unixSocketPath;