Skip to content

Commit a8a8074

Browse files
committed
Merge pull request #62 from TheThingSystem/master
ensure self.status is always a number, not a string...
2 parents 9f926de + 88a217d commit a8a8074

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/XMLHttpRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ exports.XMLHttpRequest = function() {
496496
self.handleError(errorObj);
497497
} else {
498498
// If the file returned okay, parse its data and move to the DONE state
499-
self.status = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/, "$1");
499+
self.status = parseInt(self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/, "$1"), 10);
500500
self.responseText = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/, "$1");
501501
setState(self.DONE);
502502
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "xmlhttprequest"
33
, "description": "XMLHttpRequest for Node"
4-
, "version": "1.5.0"
4+
, "version": "1.5.1"
55
, "author": {
66
"name": "Dan DeFelippi"
77
, "url": "http://driverdan.com"

0 commit comments

Comments
 (0)