diff --git a/src/factory/HttpTaskImpl.cc b/src/factory/HttpTaskImpl.cc index bb0aae56..8baba64c 100644 --- a/src/factory/HttpTaskImpl.cc +++ b/src/factory/HttpTaskImpl.cc @@ -277,6 +277,19 @@ bool ComplexHttpTask::redirect_url(HttpResponse *client_resp) return false; } + if (url[0] == '/') + { + if (url[1] != '/') + { + if (uri_.port) + url = ':' + (uri_.port + url); + + url = "//" + (uri_.host + url); + } + + url = uri_.scheme + (':' + url); + } + URIParser::parse(url, uri_); return true; }