Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
xmlHttpRequest - finalUrl returning NULL #2692
GM.xmlHttpRequest's "finalUrl" is returning NULL on a 302 Found redirect, which is observable in Wireshark:
Hypertext Transfer Protocol:
context : null
This works without a problem in Tampermonkey. Tampermonkey output:
readyState : 4
The following identical code is being used in both Greasemonkey and Tampermonkey where the URL variable is replaced for the same valid URL:
The HTTP code generating website "https://httpstat.us/302" should work as a valid test URL for this.
At first I thought mozAnon was causing the problems (since Cookies being sent will cause a similar problem in the script), but mozAnon is another issue that seems to be happening at random and the 'finalUrl' being null is what is actually causing the problem with the script.
changed the title from
xmlHttpRequest - mozAnon ignored
xmlHttpRequest - finalUrl returning empty
Nov 17, 2017
This fix should be in 4.1beta6; testing and confirming this would be very appreciated!