follow-redirects
Advanced tools
Comparing version 1.5.9 to 1.5.10
11
index.js
@@ -31,2 +31,13 @@ var url = require("url"); | ||
// Since http.request treats host as an alias of hostname, | ||
// but the url module interprets host as hostname plus port, | ||
// eliminate the host property to avoid confusion. | ||
if (options.host) { | ||
// Use hostname if set, because it has precedence | ||
if (!options.hostname) { | ||
options.hostname = options.host; | ||
} | ||
delete options.host; | ||
} | ||
// Attach a callback if passed | ||
@@ -33,0 +44,0 @@ if (responseCallback) { |
{ | ||
"name": "follow-redirects", | ||
"version": "1.5.9", | ||
"version": "1.5.10", | ||
"description": "HTTP and HTTPS modules that follow redirects.", | ||
@@ -16,7 +16,7 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git@github.com:olalonde/follow-redirects.git" | ||
"url": "git@github.com:follow-redirects/follow-redirects.git" | ||
}, | ||
"homepage": "https://github.com/olalonde/follow-redirects", | ||
"homepage": "https://github.com/follow-redirects/follow-redirects", | ||
"bugs": { | ||
"url": "https://github.com/olalonde/follow-redirects/issues" | ||
"url": "https://github.com/follow-redirects/follow-redirects/issues" | ||
}, | ||
@@ -32,10 +32,6 @@ "keywords": [ | ||
], | ||
"author": { | ||
"name": "Olivier Lalonde", | ||
"email": "olalonde@gmail.com", | ||
"url": "http://www.syskall.com" | ||
}, | ||
"author": "Ruben Verborgh <ruben@verborgh.org> (https://ruben.verborgh.org/)", | ||
"contributors": [ | ||
"James Talmage <james@talmage.io>", | ||
"Ruben Verborgh <ruben@verborgh.org> (https://ruben.verborgh.org/)" | ||
"Olivier Lalonde <olalonde@gmail.com> (http://www.syskall.com)", | ||
"James Talmage <james@talmage.io>" | ||
], | ||
@@ -53,3 +49,3 @@ "files": [ | ||
"concat-stream": "^1.6.0", | ||
"coveralls": "^3.0.0", | ||
"coveralls": "^3.0.2", | ||
"eslint": "^4.19.1", | ||
@@ -56,0 +52,0 @@ "express": "^4.16.2", |
@@ -5,10 +5,8 @@ ## Follow Redirects | ||
[![npm version](https://badge.fury.io/js/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) | ||
[![Build Status](https://travis-ci.org/olalonde/follow-redirects.svg?branch=master)](https://travis-ci.org/olalonde/follow-redirects) | ||
[![Coverage Status](https://coveralls.io/repos/olalonde/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/olalonde/follow-redirects?branch=master) | ||
[![Dependency Status](https://david-dm.org/olalonde/follow-redirects.svg)](https://david-dm.org/olalonde/follow-redirects) | ||
[![devDependency Status](https://david-dm.org/olalonde/follow-redirects/dev-status.svg)](https://david-dm.org/olalonde/follow-redirects#info=devDependencies) | ||
[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) | ||
[![Build Status](https://travis-ci.org/follow-redirects/follow-redirects.svg?branch=master)](https://travis-ci.org/follow-redirects/follow-redirects) | ||
[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) | ||
[![Dependency Status](https://david-dm.org/follow-redirects/follow-redirects.svg)](https://david-dm.org/follow-redirects/follow-redirects) | ||
[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) | ||
[![NPM](https://nodei.co/npm/follow-redirects.png?downloads=true)](https://nodei.co/npm/follow-redirects/) | ||
`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) | ||
@@ -140,3 +138,3 @@ methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) | ||
Pull Requests are always welcome. Please [file an issue](https://github.com/olalonde/follow-redirects/issues) | ||
Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) | ||
detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied | ||
@@ -159,2 +157,2 @@ by tests. You can run the test suite locally with a simple `npm test` command. | ||
MIT: [http://olalonde.mit-license.org](http://olalonde.mit-license.org) | ||
[https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE](MIT License) |
Sorry, the diff of this file is not supported yet
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
19800
291
156