+29
-7
@@ -14,2 +14,7 @@ /** | ||
| var _concat = function(uri, data) { | ||
| uri += (uri.indexOf('?') === -1 ? '?' : '&') + data; | ||
| return uri; | ||
| }; | ||
| var NodeTransport = { | ||
@@ -39,2 +44,6 @@ id: 'nodejs', | ||
| var req_url = urlInfo.pathname; | ||
| if (urlInfo.search) { | ||
| req_url += urlInfo.search; | ||
| } | ||
| if (config.data) { | ||
@@ -45,10 +54,23 @@ if (Y.Lang.isObject(config.data) && Y.QueryString) { | ||
| } | ||
| config.headers['Content-Length'] = config.data.length; | ||
| config.headers = Y.merge({ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }, config.headers); | ||
| switch (config.method) { | ||
| case 'GET': | ||
| case 'HEAD': | ||
| case 'DELETE': | ||
| req_url = _concat(req_url, config.data); | ||
| config.data = ''; | ||
| Y.log('HTTP' + config.method + ' with data. The querystring is: ' + uri, 'info', 'io'); | ||
| break; | ||
| case 'POST': | ||
| case 'PUT': | ||
| // If Content-Type is defined in the configuration object, or | ||
| // or as a default header, it will be used instead of | ||
| // 'application/x-www-form-urlencoded; charset=UTF-8' | ||
| config.headers['Content-Length'] = config.data.length; | ||
| config.headers = Y.merge({ | ||
| 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' | ||
| }, config.headers); | ||
| break; | ||
| } | ||
| } | ||
| var req_url = urlInfo.pathname; | ||
| if (urlInfo.search) { | ||
| req_url += urlInfo.search; | ||
| } | ||
| Y.log('Requesting (' + config.method + '): ' + urlInfo.hostname, 'info', 'nodeio'); | ||
@@ -55,0 +77,0 @@ if (http.get) { //0.4.0 |
+1
-1
| { | ||
| "version":"0.7.8", | ||
| "version":"0.7.9", | ||
| "author":"Dav Glass <davglass@gmail.com>", | ||
@@ -4,0 +4,0 @@ "bugs":{ |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
91690
1.1%2345
0.9%0
-100%9
12.5%