You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handling of server header responses with carriage return \r (IE11) #422
I am seeing an issue with the fetch.js method when extracting header values in IE11.
My server response headers have a trailing carriage return "\r".
In Safari, the header value pairs are extracted correctly:
var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
However, in IE11, it considers the carriage return as a pair, too. Therefore it runs into an exception case when calling normalizeName() within the append() method, complaining that the header would include an invalid character "Invalid character in header field name".
Has someone experienced the same problem? And could be potentially filter carriage returns proactively?
Hi thanks for reporting. It's very weird that we chose to split headers on \n, because the HTTP spec dictates that headers should be split by \r\n always. Could you perhaps take a shot at making a test that demonstrates this failure in IE and submit a fix?
Activity
mislav commentedon Oct 28, 2016
Hi thanks for reporting. It's very weird that we chose to split headers on
\n, because the HTTP spec dictates that headers should be split by\r\nalways. Could you perhaps take a shot at making a test that demonstrates this failure in IE and submit a fix?