We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The responseHeaders returned with GM_xmlhttpRequest include \r in FF TM 5.5.1 and don't in Chrome 5.2.+.
responseHeaders
\r
This can be worked around, but raising in case it is unintentional.
Behavior is consistent across browsers.
FF has \r\n as responseHeaders delimiter, Chrome just has \n.
\r\n
\n
// ==UserScript== // @name HTTP Header in xmlhttpRequest // @namespace http://tampermonkey.net/ // @version 2024-08-17 // @description try to take over the world! // @author You // @grant GM_xmlhttpRequest // @match https://github.com/ // @connect self // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // ==/UserScript== (async function() { 'use strict'; await GM_xmlhttpRequest({ method: "GET", url: "https://github.com/", onload: function(response) { console.log(`Headers includes \\r?: ${response.responseHeaders.includes('\r')}`); } }); })();
Run this on https://github.com and look in the console in both Firefox and Chrome. Chrome will print false, FF will print true.
false
true
The text was updated successfully, but these errors were encountered:
Observe the same behaviour. This breaks some of our logic to parse headers and caused incompatibility.
Sorry, something went wrong.
Should be fixed at 5.3.6209 (crx|xpi in review)
Please download the crx file linked above and drag and drop it to the extensions page chrome://extensions (after you've enabled 'Developer Mode').
chrome://extensions
For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.
Didn't try beta version, not sure how tampermonkey fix this.
Just want to add some context: RFC says HTTP header should always use CRLF as line break.
No branches or pull requests
The
responseHeaders
returned with GM_xmlhttpRequest include\r
in FF TM 5.5.1 and don't in Chrome 5.2.+.This can be worked around, but raising in case it is unintentional.
Expected Behavior
Behavior is consistent across browsers.
Actual Behavior
FF has
\r\n
asresponseHeaders
delimiter, Chrome just has\n
.Specifications
Script
Run this on https://github.com and look in the console in both Firefox and Chrome. Chrome will print
false
, FF will printtrue
.The text was updated successfully, but these errors were encountered: