Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

GM_xmlhttpRequest fails in Firefox 5/Aurora #1354

Closed
BinarySplit opened this Issue · 0 comments

2 participants

@BinarySplit

Using Firefox 5(Beta Channel) and Firefox 5.0a2 (Aurora Channel), most scripts work fine. However, when a script calls GM_xmlhttpRequest, it will never run onload and always run onerror, even if the request succeeded (which can be checked using a debugging proxy such as Fiddler2).

Here is a good script for testing:

// ==UserScript==
// @name           Test GM_xmlhttpRequest
// @namespace      BSP
// @include        https://github.com/
// ==/UserScript==

var log = {};

log.returnValue = GM_xmlhttpRequest({
    method:"GET",
    url:"https://github.com/",
    onload:function(r)
    {
        log.result = "success";
        log.resultData = r;
        alert(log.toSource());
    },
    onerror:function(e)
    {
        log.result = "error";
        log.resultData = e;
        alert(log.toSource());
    }
});

This alerts:

({
    returnValue:{abort:(function () {req.abort();})}, 
    result:"error", 
    resultData:{responseText:"", readyState:4, responseHeaders:null, status:null, statusText:null, finalUrl:null}
})
@arantius arantius closed this in 6622f5d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.