[Development] Proposal for allowing handling of HTTP redirects in QNAM

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Dec 30 17:07:27 CET 2013


>>> So I guess having body in the 3xx response will not be all that unusual.
>>
>> It will be.
>
> Actually, it's extremely common - here's a default apache 301 for example:
>
> monster:/home/rich/src/wireshark # telnet xmelegance.org 80
> Trying 80.68.89.8...
> Connected to xmelegance.org.
> Escape character is '^]'.
> GET /devel HTTP/1.1
> Host: xmelegance.org
> Content-Length: 0
>
> HTTP/1.1 301 Moved Permanently
> Date: Mon, 30 Dec 2013 15:13:21 GMT
> Server: Apache
> Location: http://xmelegance.org/devel/
> Content-Length: 236
> Content-Type: text/html; charset=iso-8859-1
>
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>301 Moved Permanently</title>
> </head><body>
> <h1>Moved Permanently</h1>
> <p>The document has moved <a href="http://xmelegance.org/devel/">here</a>.</p>
> </body></html>

I guess the body is provided for clients who can't or intentionally
won't, do a HTTP redirect. In that case the message in the body is
shown to the user to do a manual redirect.

In any case, coming back to the original question, how should the
downloadProgress signal behave? Have it reset each time on a redirect
(as the total bytes can possibly change across redirects)?

I guess this is also the only way to do it as we don't know in advance
how many redirects are going to happen and what content they may
carry.

-mandeep

>
> Cheers
>
> Rich.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list