You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Since 1.4.0-rc1 and confirmed in 1.4.1, calling $http.delete('url') in IE10 causes a non-zero Content-Length header to be added to the request. I noticed this when the webserver was returning HTTP error code 415 on all $http.delete calls.
I tracked this down to 1.4.0-rc1 where xhr.send(post || null) in createHttpBackend was changed to xhr.send(post). When post is undefined, this problem occurs in IE10. The code below reproduces this bug in IE10 and is essentially what $http.delete('url') is doing.
var xhr= new window.XMLHttpRequest();
var post;
xhr.open('DELETE', 'url', true);
xhr.send(post);
Changing xhr.send(post) to xhr.send(post || null) fixes the problem.
The text was updated successfully, but these errors were encountered:
This was changed in e04a887 (which looks like a valid fix). I guess we need to find another work-around for IE (probably be explicitly passing null for the requests without body)
This issue seems to affect AngularJS 1.4.3 on IE11 as well. I was able to work around it by passing { data: null } as second parameter to the delete() method of the $http service.
IE11 (and maybe others) converts an `undefined` argument to `xhr.send()` to
string (`'undefined'`) for certain request methods (e.g. DELETE). This
causes the request to appear having a body, when it shouldn't.
Fixesangular#12141Fixesangular#12739
Since 1.4.0-rc1 and confirmed in 1.4.1, calling
$http.delete('url')
in IE10 causes a non-zero Content-Length header to be added to the request. I noticed this when the webserver was returning HTTP error code 415 on all$http.delete
calls.I tracked this down to 1.4.0-rc1 where
xhr.send(post || null)
in createHttpBackend was changed toxhr.send(post)
. When post is undefined, this problem occurs in IE10. The code below reproduces this bug in IE10 and is essentially what$http.delete('url')
is doing.Changing
xhr.send(post)
toxhr.send(post || null)
fixes the problem.The text was updated successfully, but these errors were encountered: