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

Richard Moore rich at kde.org
Thu Dec 26 13:17:08 CET 2013

On 25 December 2013 07:54, Mandeep Sandhu <mandeepsandhu.chd at gmail.com> wrote:
>>> 3. QNetworkReply stores both, the original as well as the final url.
>> What about the intermediate ones in a chain of redirects?
> Another question that springs to mind is what should the QNetworkReply
> object returned to the user reflect while the redirects are going on?
> Eg: What should the download progress signal show? should we keep
> emitting it for intermediate requests too? Similarly, what should
> other APIs like url(), operation() show, info about the 1st or the
> final request?
> Your thoughts?

The download progress signal will have to be emitted for the
intermediate requests. Things like operation() and url() are stored in
the request object which can't be changed by the QNAM at all. If
people want all the details then they must implement their own
redirection support. The built in support can only cover the simple

> If this gets unnecessarily complex to be done from within the QNAM
> framework, maybe we can have some sort of a 'wrapper' class handling
> redirects using QNR's public APIs. We could possibly keep such a class
> in the qt-solutions repository if needed.

That's possible, but it would be nicer to have something built-in.

> Oh and Merry X'mas everyone! :)

And to you!


> -mandeep

More information about the Development mailing list