[whatwg/xhr] setRequestHeader behavior doesn't seem to match implementations (#108)

If you look at http://w3c-test.org/XMLHttpRequest/setrequestheader-case-insensitive.htm it fails in all of Safari, Chrome, Firefox, and Edge.  The test is doing this:

        var client = new XMLHttpRequest()
        client.open("POST", "resources/inspect-headers.py?filter_value=t1,t2,t3", false)
        client.setRequestHeader("x-test", "t1")
        client.setRequestHeader("X-TEST", "t2")
        client.setRequestHeader("X-teST", "t3")
        client.send(null)
        assert_equals(client.responseText, "x-test,")

which asserts that the value of the "x-test" header that was sent to the server is "t1,t2,t3".  In Safari, Chrome, Firefox, and Edge the value is "t1, t2, t3".

This sort of thing has come up before (e.g. <https://github.com/whatwg/fetch/issues/422>)...

@annevk I don't know whether you want to fix this in XHR or in fetch or whether you think all browsers should change here or what...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/108

Received on Wednesday, 25 January 2017 21:50:49 UTC