Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($httpBackend): set headers even if they have falsy values #3857

Closed

Conversation

ricardohbin
Copy link
Contributor

Resolving the issue #2984

@@ -56,7 +56,7 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
var xhr = new XHR();
xhr.open(method, url, true);
forEach(headers, function(value, key) {
if (value) xhr.setRequestHeader(key, value);
if (typeof value !== "undefined") xhr.setRequestHeader(key, value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps use isDefined(value) here?

@ricardohbin
Copy link
Contributor Author

@petebacondarwin nice one pete, makes sense :) Already fixed.

@btford
Copy link
Contributor

btford commented Sep 30, 2013

Looks good to me, but the commit message should note that this is a breaking change.

@ghost ghost assigned btford Sep 30, 2013
@btford
Copy link
Contributor

btford commented Oct 1, 2013

Landed as e9a2224. Thanks!

@btford btford closed this Oct 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants