Fix for wrong web caching mechanism. Py2 comp.

Wed, 05 Jun 2013 20:23:59 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Wed, 05 Jun 2013 20:23:59 +0200
branch
Py2 comp.
changeset 2698
1dcd5d887980
parent 2684
b1d8db9a31bc
child 2716
98c11482598e

Fix for wrong web caching mechanism.

Helpviewer/Network/NetworkAccessManager.py file | annotate | diff | comparison | revisions
diff -r b1d8db9a31bc -r 1dcd5d887980 Helpviewer/Network/NetworkAccessManager.py
--- a/Helpviewer/Network/NetworkAccessManager.py	Fri May 31 08:56:31 2013 +0200
+++ b/Helpviewer/Network/NetworkAccessManager.py	Wed Jun 05 20:23:59 2013 +0200
@@ -144,8 +144,12 @@
             req.setRawHeader("Accept-Language", self.__acceptLanguage)
         
         # set cache policy
-        req.setAttribute(QNetworkRequest.CacheLoadControlAttribute,
-            Preferences.getHelp("CachePolicy"))
+        if op == QNetworkAccessManager.GetOperation:
+            req.setAttribute(QNetworkRequest.CacheLoadControlAttribute,
+                Preferences.getHelp("CachePolicy"))
+        else:
+            req.setAttribute(QNetworkRequest.CacheLoadControlAttribute,
+                QNetworkRequest.AlwaysNetwork)
         
         # AdBlock code
         if op == QNetworkAccessManager.GetOperation:

eric ide

mercurial