Comparing version 2.21.0 to 2.22.0
26
index.js
@@ -154,3 +154,3 @@ // Copyright 2010-2012 Mikeal Rogers | ||
if (self.url) { | ||
if (self.url && !self.uri) { | ||
// People use this property instead all the time so why not just support it. | ||
@@ -388,3 +388,3 @@ self.uri = self.url | ||
self.once('pipe', function (src) { | ||
self.on('pipe', function (src) { | ||
if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") | ||
@@ -410,5 +410,5 @@ self.src = src | ||
self.on('pipe', function () { | ||
console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") | ||
}) | ||
// self.on('pipe', function () { | ||
// console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") | ||
// }) | ||
}) | ||
@@ -557,5 +557,15 @@ | ||
poolKey += options.cert.toString('ascii') + options.key.toString('ascii') | ||
if (options.ciphers) { | ||
if (poolKey) poolKey += ':' | ||
poolKey += options.ciphers | ||
} | ||
if (options.secureOptions) { | ||
if (poolKey) poolKey += ':' | ||
poolKey += options.secureOptions | ||
} | ||
} | ||
if (!poolKey && Agent === this.httpModule.Agent && this.httpModule.globalAgent) { | ||
if (!poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { | ||
// not doing anything special. Use the globalAgent | ||
@@ -813,3 +823,3 @@ return this.httpModule.globalAgent | ||
if (self.dests.length !== 0) { | ||
console.error("Ingoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") | ||
console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") | ||
} else { | ||
@@ -1241,2 +1251,4 @@ response.setEncoding(self.encoding) | ||
request.Request = Request; | ||
request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG) | ||
@@ -1243,0 +1255,0 @@ |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "2.21.0", | ||
"version": "2.22.0", | ||
"author": "Mikeal Rogers <mikeal.rogers@gmail.com>", | ||
@@ -29,3 +29,3 @@ "repository": { | ||
"tunnel-agent": "~0.3.0", | ||
"http-signature": "~0.9.11", | ||
"http-signature": "~0.10.0", | ||
"hawk": "~0.13.0", | ||
@@ -32,0 +32,0 @@ "aws-sign": "~0.3.0", |
@@ -121,3 +121,3 @@ # Request -- Simplified HTTP request method | ||
```javascript | ||
request.auth('username', 'password', false).get('http://some.server.com/'); | ||
request.get('http://some.server.com/').auth('username', 'password', false); | ||
// or | ||
@@ -124,0 +124,0 @@ request.get('http://some.server.com/', { |
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
199637
54
3252
25
+ Addedassert-plus@0.1.5(transitive)
+ Addedctype@0.5.3(transitive)
+ Addedhttp-signature@0.10.1(transitive)
- Removedassert-plus@0.1.2(transitive)
- Removedctype@0.5.2(transitive)
- Removedhttp-signature@0.9.11(transitive)
Updatedhttp-signature@~0.10.0