Ticket #1029: http_check.patch

File http_check.patch, 858 bytes (added by lucian, 12 years ago)
  • downloadmanager.py

    diff --git a/downloadmanager.py b/downloadmanager.py
    index 8402b81..2a6584a 100644
    a b def save_link(url, text, owner_document): 
    311311        interfaces.nsIRequest.LOAD_BYPASS_CACHE | \
    312312        interfaces.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS
    313313
    314     if _implements_interface(channel, interfaces.nsIHttpChannel):
    315         channel.referrer = io_service.newURI(owner_document.documentURI, None,
    316                                              None)
     314    if uri.scheme == 'http':
     315        if _implements_interface(channel, interfaces.nsIHttpChannel):
     316            channel.referrer = io_service.newURI(owner_document.documentURI,
     317                                                 None, None)
    317318
    318319    # kick off the channel with our proxy object as the listener
    319320    listener = xpcom.server.WrapObject(