xmlhttprequest-ssl
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -377,3 +377,4 @@ /** | ||
if (!headers["Content-Type"]) { | ||
var headersKeys = Object.keys(headers); | ||
if (!headersKeys.some(function (h) { return h.toLowerCase() === 'content-type' })) { | ||
headers["Content-Type"] = "text/plain;charset=UTF-8"; | ||
@@ -493,2 +494,6 @@ } | ||
var errorHandler = function(error) { | ||
// In the case of https://nodejs.org/api/http.html#requestreusedsocket triggering an ECONNRESET, | ||
// don't fail the xhr request, attempt again. | ||
if (request.reusedSocket && error.code === 'ECONNRESET') | ||
return doRequest(options, responseHandler).on('error', errorHandler); | ||
self.handleError(error); | ||
@@ -495,0 +500,0 @@ } |
{ | ||
"name": "xmlhttprequest-ssl", | ||
"description": "XMLHttpRequest for Node", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"author": { | ||
@@ -27,3 +27,3 @@ "name": "Michael de Wit" | ||
"scripts": { | ||
"test": "cd ./tests && node test-constants.js && node test-events.js && node test-exceptions.js && node test-headers.js && node test-redirect-302.js && node test-redirect-303.js && node test-redirect-307.js && node test-request-methods.js && node test-request-protocols-txt-data.js && node test-request-protocols-binary-data.js && node test-sync-response.js && node test-utf8-tearing.js" | ||
"test": "cd ./tests && node test-constants.js && node test-events.js && node test-exceptions.js && node test-headers.js && node test-redirect-302.js && node test-redirect-303.js && node test-redirect-307.js && node test-request-methods.js && node test-request-protocols-txt-data.js && node test-request-protocols-binary-data.js && node test-sync-response.js && node test-utf8-tearing.js && node test-keepalive.js" | ||
}, | ||
@@ -34,4 +34,9 @@ "directories": { | ||
}, | ||
"files": [ | ||
"lib/XMLHttpRequest.js", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"main": "./lib/XMLHttpRequest.js", | ||
"dependencies": {} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
3
25414
4
604