Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Orange/canvas/help/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ def _fetch_inventory(self, url):
manager.setCache(cache)
req = QNetworkRequest(url)

# Follow redirects (for example http -> https)
# If redirects were not followed, the documentation would not be found
try:
req.setAttribute(QNetworkRequest.FollowRedirectsAttribute, 1) # from Qt 5.6
req.setAttribute(QNetworkRequest.RedirectPolicyAttribute, # from Qt 5.9
QNetworkRequest.NoLessSafeRedirectPolicy)
except AttributeError: # if ran with earlier Qt
pass

self._reply = manager.get(req)
manager.finished.connect(self._on_finished)
else:
Expand Down