Comparing version 3.1.0 to 3.1.1
@@ -0,1 +1,7 @@ | ||
### 3.1.1 | ||
* Send valid host header - **[@jkrems](https://github.com/jkrems)** [#61](https://github.com/groupon/gofer/pull/61) | ||
- [`154d266`](https://github.com/groupon/gofer/commit/154d266a509329528ca5ec904b2376b7e1a0cb4a) **fix:** Send valid host header | ||
### 3.1.0 | ||
@@ -2,0 +8,0 @@ |
@@ -223,2 +223,3 @@ /* | ||
protocol: urlObj.protocol, | ||
host: urlObj.host, | ||
hostname: hostname, | ||
@@ -225,0 +226,0 @@ port: urlObj.port, |
@@ -98,3 +98,3 @@ /* | ||
function request_(options, resolve, reject) { | ||
var hostname = options.hostname; | ||
var host = options.host; | ||
var setHost = options.setHost; | ||
@@ -175,3 +175,3 @@ var fullUrl = buildFullUrl(options); | ||
function onResponseTimedOut() { | ||
var error = new Error('Fetching from ' + hostname + ' timed out'); | ||
var error = new Error('Fetching from ' + host + ' timed out'); | ||
error.code = 'ETIMEDOUT'; | ||
@@ -184,3 +184,3 @@ error.timeout = options.timeout; | ||
function onConnectTimedOut() { | ||
var error = new Error('Connection to ' + hostname + ' timed out'); | ||
var error = new Error('Connection to ' + host + ' timed out'); | ||
error.code = 'ECONNECTTIMEDOUT'; | ||
@@ -215,3 +215,3 @@ error.connectTimeout = options.connectTimeout; | ||
if (setHost !== false && !req.getHeader('Host')) { | ||
req.setHeader('Host', hostname); | ||
req.setHeader('Host', host); | ||
} | ||
@@ -218,0 +218,0 @@ |
@@ -51,2 +51,3 @@ /* | ||
auth: base.auth, | ||
host: base.host, | ||
hostname: base.hostname, | ||
@@ -53,0 +54,0 @@ port: base.port, |
{ | ||
"name": "gofer", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "A general purpose service client library", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
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
55191
1133