[kde-community] Usage of QNetworkAccessManager

Richard Moore richmoore44 at gmail.com
Sun Jul 17 21:33:13 BST 2016


On 14 July 2016 at 17:38, Thiago Macieira <thiago at kde.org> wrote:

> On quinta-feira, 14 de julho de 2016 18:33:37 PDT Ben Cooksley wrote:
>
> > Unfortunately, from it's first iteration in Qt 4 QNetworkAccessManager
> > w
> ​e ​
> as shipped with a severe and fundamental defect in that it does not
> > follow HTTP redirects by default. Due to Qt behavioural and other
> > compatibility promises they can never change this behaviour, not even
> > in Qt 6.
>

​This is incorrect. We can certainly change it in qt6. In fact it's an open
discussion if we can change it before - we need evidence that the change
will not break apps that handle redirects themselves. If anyone has time to
test this then pleas​e let me know the results.

​​

> >
> > Please therefore ensure your application handles redirects
> > appropriately (the form of the code will depend on the version of Qt
> > in use) if you decide to use QNAM.
>
> You do that by setting the attribute FollowRedirectsAttribute in your
> QNetworkRequests.
>
>
​​
​Yes, the code in the example dfaure has linked to does it the hard way.

Cheers

Rich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-community/attachments/20160717/c1e3bca1/attachment.htm>


More information about the kde-community mailing list