Track tasks and feature requests
Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesjqXHR.getResponseHeader #3403
Comments
This comment has been minimized.
This comment has been minimized.
|
The problem seems to be misimplementation of @PSPvZ, would you be willing to submit a PR updating our |
gibson042
added
Ajax
Web Standards
labels
Nov 21, 2016
timmywil
added this to the 4.0.0 milestone
Nov 21, 2016
This comment has been minimized.
This comment has been minimized.
pankajpatel
commented
Nov 23, 2016
•
|
Hello, |
This comment has been minimized.
This comment has been minimized.
Yes! https://contribute.jquery.org/commits-and-pull-requests/ |
markelog
removed this from the 4.0.0 milestone
Dec 5, 2016
markelog
added
the
Needs review
label
Dec 5, 2016
timmywil
added
help wanted
and removed
Needs review
labels
Dec 19, 2016
timmywil
added this to the Future milestone
Dec 19, 2016
gibson042
added
the
Bug
label
Dec 19, 2016
timmywil
modified the milestones:
3.2.0,
Future
Dec 19, 2016
timmywil
modified the milestones:
3.2.0,
3.3.0
Mar 6, 2017
timmywil
modified the milestones:
Future,
3.3.0
Mar 27, 2017
This comment has been minimized.
This comment has been minimized.
@gibson042, done: #4173 |
PSPvZ commentedNov 18, 2016
Description
jqXHR.getResponseHeader fails to combine multiple HTTP headers with the same name. Instead, it only returns the value of the last HTTP header. This clashes with the specification of XMLHttpRequest.getResponseHeader, which states: "If there are multiple response headers with the same name, then their values are returned as a single concatenated string, where each value is separated from the previous one by a pair of comma and space."
The issue seems to occur only on Internet Explorer (I encountered it on IE11); calling IE's own XMLHttpRequest.getRequestHeader implementation does return the correct result,
From what I can tell Firefox 50 already combined the two headers into one before calling the XMLHttpRequest completion callback, inadvertently allowing jQuery to return the correct result.
Tested in jQuery 3.1.1.
Link to test case
I have no test-environment that can easily set multiple headers with the same name, unfortunately.