Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
5.3.1, 5.12.0
-
None
Description
I am using QNetworkReply and grabbing the Location header for redirects like this:
// redirection const QVariant location = reply->header(QNetworkRequest::LocationHeader); QString redirectURL; if(location.isValid()) { redirectURL = location.toString(); }
When the server replies with a Network-Path Reference URI (see http://tools.ietf.org/html/rfc3986#section-4.2), which begins with two slashes, the location header is reported to be invalid and the code does not follow the redirect.
Example Location header:
Location: //addons.cursecdn.com/files/2213\117/appliedenergistics2-rv1-beta-19.jar
The meaning of the // is that the URL is relative to the scheme used for the request.
So, the location IS valid (unlike what Qt reports) and the value reported by Qt should be:
{scheme of the request URL}://addons.cursecdn.com/files/2213\117/appliedenergistics2-rv1-beta-19.jar