Closed sekmun closed 8 years ago
on 469: when setting Authorization there is a trailing space for "Basic" (ie, "Basic")... I just added a .trim() to value, so
470: xhr.setRequestHeader(header, value.trim());
Not sure if that would break stuff? Why would there be a trailing space for Safari?!!
Thanks for debugging @sekmun, I just pasted this into the safari console:
//invalid authorization format?
var x = new XMLHttpRequest(); x.open("GET", "foo"); x.setRequestHeader("Authorization", " Basic foo"); x.onload = console.info.bind(console, x); x.send();
and it triggers a Error: SyntaxError: DOM Exception 12
so it looks like it's not an XDomain issue. I'll close, you can reopen if you find anything else :)
I'm seeing this in Safari 9 OSX:
Seems to be related to an older problem, anyone else seeing this? thanks