Socket
Socket
Sign inDemoInstall

request

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request - npm Package Compare versions

Comparing version 2.16.0 to 2.16.2

5

index.js

@@ -22,2 +22,3 @@ // Copyright 2010-2012 Mikeal Rogers

, qs = require('qs')
, querystring = require('querystring')
, crypto = require('crypto')

@@ -297,7 +298,7 @@

if (self.uri.auth && !self.headers.authorization) {
var authPieces = self.uri.auth.split(':').map(function(item){ return qs.unescape(item) })
var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) })
self.auth(authPieces[0], authPieces[1], true)
}
if (self.proxy && self.proxy.auth && !self.headers['proxy-authorization'] && !self.tunnel) {
self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
self.headers['proxy-authorization'] = "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))
}

@@ -304,0 +305,0 @@

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "2.16.0",
"version": "2.16.2",
"author": "Mikeal Rogers <mikeal.rogers@gmail.com>",

@@ -13,0 +13,0 @@ "repository": {

@@ -63,5 +63,13 @@ var assert = require('assert')

console.log('All tests passed');
basicServer.close();
request({
'method': 'GET',
'uri': 'http://test:testing2@localhost:6767/test2/'
}, function(error, response, body) {
assert.equal(response.statusCode, 200);
assert.equal(numBasicRequests, 4);
console.log('All tests passed');
basicServer.close();
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc