Re: [whatwg/xhr] Web compat implications of making getAllResponseHeaders lowercase (#146)

@RByers there's a couple of reasons why it would be nice to keep it lowercase:

1. Less primitives in browsers. We can just use one kind of casing throughout for response headers and don't have to preserve casing. (`fetch()` always has lowercase response headers. It also exposes request headers as lowercase, but for those we do have to preserve casing unfortunately.)
2. Related to 1, we also don't have to decide if we get duplicate headers with the same name which one ends up deciding the casing for both.
3. H/2 only has lowercase so any application that depends on the casing would already not be robust to server switches.
4. Intermediaries are allowed to change casing so the moment you inject some third-party caching in your application it might end up breaking if you're not robust against this.

Of course, if too much breaks it's not tenable and we'll have to add more H/1+XMLHttpRequest special cases.

-- 
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/146#issuecomment-318987914

Received on Monday, 31 July 2017 07:15:13 UTC