File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,6 @@ export class HttpXhrBackend implements HttpBackend {
112112 return headerResponse ;
113113 }
114114
115- // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450).
116- const status : number = xhr . status === 1223 ? HttpStatusCode . NoContent : xhr . status ;
117115 const statusText = xhr . statusText || 'OK' ;
118116
119117 // Parse headers from XMLHttpRequest - this step is lazy.
@@ -124,7 +122,7 @@ export class HttpXhrBackend implements HttpBackend {
124122 const url = getResponseUrl ( xhr ) || req . url ;
125123
126124 // Construct the HttpHeaderResponse and memoize it.
127- headerResponse = new HttpHeaderResponse ( { headers, status, statusText, url} ) ;
125+ headerResponse = new HttpHeaderResponse ( { headers, status : xhr . status , statusText, url} ) ;
128126 return headerResponse ;
129127 } ;
130128
Original file line number Diff line number Diff line change @@ -350,16 +350,6 @@ const XSSI_PREFIX = ')]}\'\n';
350350 } ) ;
351351 } ) ;
352352 describe ( 'corrects for quirks' , ( ) => {
353- it ( 'by normalizing 1223 status to 204' , done => {
354- backend . handle ( TEST_POST ) . pipe ( toArray ( ) ) . subscribe ( events => {
355- expect ( events . length ) . toBe ( 2 ) ;
356- expect ( events [ 1 ] . type ) . toBe ( HttpEventType . Response ) ;
357- const response = events [ 1 ] as HttpResponse < string > ;
358- expect ( response . status ) . toBe ( HttpStatusCode . NoContent ) ;
359- done ( ) ;
360- } ) ;
361- factory . mock . mockFlush ( 1223 , 'IE Special Status' , 'Test' ) ;
362- } ) ;
363353 it ( 'by normalizing 0 status to 200 if a body is present' , done => {
364354 backend . handle ( TEST_POST ) . pipe ( toArray ( ) ) . subscribe ( events => {
365355 expect ( events . length ) . toBe ( 2 ) ;
You can’t perform that action at this time.
0 commit comments