Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--downloadmanager.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/downloadmanager.py b/downloadmanager.py
index e41d06f..dd75783 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -308,9 +308,12 @@ def save_link(url, text, owner_document):
interfaces.nsIRequest.LOAD_BYPASS_CACHE | \
interfaces.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS
- if _implements_interface(channel, interfaces.nsIHttpChannel):
- channel.referrer = io_service.newURI(owner_document.documentURI, None,
- None)
+ # HACK: when we QI for nsIHttpChannel on objects that implement
+ # just nsIChannel, pyxpcom gets confused trac #1029
+ if uri.scheme == 'http':
+ if _implements_interface(channel, interfaces.nsIHttpChannel):
+ channel.referrer = io_service.newURI(owner_document.documentURI,
+ None, None)
# kick off the channel with our proxy object as the listener
listener = xpcom.server.WrapObject(