XHR.getAllResponseHeaders () does not return headers as expected in Chrome 60

In our web application, we use the XHR.getAllResponseHeaders()-function to retrieve the header field names. We use X-Access-Tokento get the JWT token, which we sent in the next request to save the session. From today, after logging in, each subsequent request has led to a redirect to the login page.

Oddly enough, this was just a Chrome issue, not Firefox or Safari. And that was only on my computer, because my colleague could still log in while I couldn't.

We use the same software, some javascript, the same, so we noted that this should be something with my browser. I tried to reinstall and disable some plugins, but it didn’t mean anything.

It seems to me that the function XHR.getAllResponseHeaders()returns the wrong values, although we send the correct ones from the server ... Any idea why it doesn't work anymore?

+4
source share
1 answer

, , , , , Chrome 60 Chrome 59 ( ), . , x-access-token x-access-token

, XHR.getAllResponseHeaders() - javascript -, Chrome : javascript, , Chrome 60, XHR.getAllResponseHeaders() !

- : https://twitter.com/thegecko/status/890346862875742210

@thegecko: ! #Chrome 60 XHR.getAllResponseHeaders() !

. : https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/_oxlCPNsrck, https://github.com/whatwg/xhr/issues/146 https://chromium.googlesource.com/chromium/src/+/99c274ae8e7d366261dcfb89e0b98e733fb9d5f4

github google, , , , , , . upcomming HTTP/2 . - XHR- HTTP/1.1. Chrome (60) , Gecko/Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1370485) Webkit/Safari ...

, Foo: Bar XHR.getAllResponseHeaders() - ( Chrome 60) `foo: Bar.

, : , . , XHR.getAllResponseHeaders().toLowerCase() , XHR.getAllResponseHeaders().match(/foo/i);, .

: ... , XHR.getResponseHeader() . , Foo: Bar , XHR.getResponseHeader('Foo') XHR.getResponseHeader('Foo'), "Bar".

MDN XHR.getResponseHeader :

.

+12

Source: https://habr.com/ru/post/1682663/


All Articles