Abort background requests if policy changes to disallow them
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Fri, 13 Apr 2012 17:05:33 +0000 (18:05 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Apr 2012 17:46:07 +0000 (19:46 +0200)
commitaf100dbd7e23076f8873f9ee8847d1ac90bb1700
treed22ffeea04285d446bfecbd7fee89dad510bef30
parentddf040eccb56098db4f81a72fd9db0010697da94
Abort background requests if policy changes to disallow them

Using the policy change signal from QNetworkSession.
If the new policy disallows background requests and this is a
background request, then generate an error.
This results in a TCP RST on the socket, and a
BackgroundRequestNotAllowedError on the QNetworkReply.

If the reply is already finished, no action is taken.

Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/access/qnetworkreplyhttpimpl.cpp
src/network/access/qnetworkreplyimpl.cpp
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp