Skip to content

Commit

Permalink
using hasOwnProperty() to verify each of the header object's enumerat…
Browse files Browse the repository at this point in the history
…ed properties are owned by the object, they are skipped otherwise.

Closes issue #1065
  • Loading branch information
Erik Vold authored and arantius committed Apr 5, 2010
1 parent 1b6c3ff commit 6000de1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/xmlhttprequester.js
Expand Up @@ -72,7 +72,9 @@ function(safeUrl, details, req) {

if (details.headers) {
for (var prop in details.headers) {
req.setRequestHeader(prop, details.headers[prop]);
if (details.headers.hasOwnProperty(prop)) {
req.setRequestHeader(prop, details.headers[prop]);
}
}
}

Expand Down

0 comments on commit 6000de1

Please sign in to comment.