diff options
author | Gonzalo Odiard <godiard@sugarlabs.org> | 2010-10-05 11:36:47 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@sugarlabs.org> | 2010-10-05 11:36:47 (GMT) |
commit | 6f23780232dd340d29dd6d5741eac729948af997 (patch) | |
tree | f205cfae261588f1e883d0fb214d7121d53b4607 | |
parent | 20097b7593f17c96694c4ce1960c351a1f00934b (diff) |
fix #10365. Only backport solution from Browse in Sugar 0.90
-rw-r--r-- | downloadmanager.py | 9 |
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( |