From 6f23780232dd340d29dd6d5741eac729948af997 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 05 Oct 2010 11:36:47 +0000 Subject: fix #10365. Only backport solution from Browse in Sugar 0.90 --- 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( -- cgit v0.9.1