aboutsummaryrefslogtreecommitdiffstats
path: root/test/middleware-mockserver.js
diff options
context:
space:
mode:
authorAndrei Fangli <andrei_fangli@outlook.com>2018-11-26 19:00:41 +0200
committerTimmy Willison <4timmywil@gmail.com>2018-11-26 12:00:41 -0500
commite0d941156900a6bff7c098c8ea7290528e468cf8 (patch)
tree5f0deeaf8fd98971364f57f66bd603e21326748f /test/middleware-mockserver.js
parent3ac907864c4d36b4fcb58826d9cb0e4ed62334b2 (diff)
downloadjquery-e0d941156900a6bff7c098c8ea7290528e468cf8.tar.gz
jquery-e0d941156900a6bff7c098c8ea7290528e468cf8.zip
Ajax: Fix getResponseHeader(key) for IE11
- getResponseHeader(key) combines all header values for the provided key into a single result where values are concatenated by ', '. This does not happen for IE11 since multiple values for the same header are returned on separate lines. This makes the function only return the last value of the header for IE11. - Updated ajax headers test to better cover Object.prototype collisions Close gh-4173 Fixes gh-3403
Diffstat (limited to 'test/middleware-mockserver.js')
-rw-r--r--test/middleware-mockserver.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/middleware-mockserver.js b/test/middleware-mockserver.js
index 35623761d..09371bbe9 100644
--- a/test/middleware-mockserver.js
+++ b/test/middleware-mockserver.js
@@ -132,7 +132,10 @@ var mocks = {
resp.writeHead( 200, {
"Sample-Header": "Hello World",
"Empty-Header": "",
- "Sample-Header2": "Hello World 2"
+ "Sample-Header2": "Hello World 2",
+ "List-Header": "Item 1",
+ "list-header": "Item 2",
+ "constructor": "prototype collision (constructor)"
} );
req.query.keys.split( "|" ).forEach( function( key ) {
if ( req.headers[ key.toLowerCase() ] ) {