@@ -455,20 +455,12 @@ jQuery.extend( {
455
455
if ( ! responseHeaders ) {
456
456
responseHeaders = { } ;
457
457
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 ] ;
467
459
}
468
460
}
469
461
match = responseHeaders [ key . toLowerCase ( ) + " " ] ;
470
462
}
471
- return match == null ? null : match . join ( ", " ) ;
463
+ return match == null ? null : match ;
472
464
} ,
473
465
474
466
// Raw string
@@ -542,24 +534,8 @@ jQuery.extend( {
542
534
// A cross-domain request is in order when the origin doesn't match the current origin.
543
535
if ( s . crossDomain == null ) {
544
536
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 ;
563
539
}
564
540
565
541
// Apply prefilters
0 commit comments