@@ -455,20 +455,12 @@ jQuery.extend( {
455455 if ( ! responseHeaders ) {
456456 responseHeaders = { } ;
457457 while ( ( match = rheaders . exec ( responseHeadersString ) ) ) {
458-
459- // Support: IE 11+
460- // `getResponseHeader( key )` in IE doesn't combine all header
461- // values for the provided key into a single result with values
462- // joined by commas as other browsers do. Instead, it returns
463- // them on separate lines.
464- responseHeaders [ match [ 1 ] . toLowerCase ( ) + " " ] =
465- ( responseHeaders [ match [ 1 ] . toLowerCase ( ) + " " ] || [ ] )
466- . concat ( match [ 2 ] ) ;
458+ responseHeaders [ match [ 1 ] . toLowerCase ( ) + " " ] = match [ 2 ] ;
467459 }
468460 }
469461 match = responseHeaders [ key . toLowerCase ( ) + " " ] ;
470462 }
471- return match == null ? null : match . join ( ", " ) ;
463+ return match == null ? null : match ;
472464 } ,
473465
474466 // Raw string
@@ -542,24 +534,8 @@ jQuery.extend( {
542534 // A cross-domain request is in order when the origin doesn't match the current origin.
543535 if ( s . crossDomain == null ) {
544536 urlAnchor = document . createElement ( "a" ) ;
545-
546- // Support: IE <=8 - 11+
547- // IE throws exception on accessing the href property if url is malformed,
548- // e.g. http://example.com:80x/
549- try {
550- urlAnchor . href = s . url ;
551-
552- // Support: IE <=8 - 11+
553- // Anchor's host property isn't correctly set when s.url is relative
554- urlAnchor . href = urlAnchor . href ;
555- s . crossDomain = originAnchor . protocol + "//" + originAnchor . host !==
556- urlAnchor . protocol + "//" + urlAnchor . host ;
557- } catch ( e ) {
558-
559- // If there is an error parsing the URL, assume it is crossDomain,
560- // it can be rejected by the transport if it is invalid
561- s . crossDomain = true ;
562- }
537+ urlAnchor . href = s . url ;
538+ s . crossDomain = originAnchor . origin !== urlAnchor . origin ;
563539 }
564540
565541 // Convert data if not already a string
0 commit comments