Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetch

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

13

lib/fetch.js

@@ -9,3 +9,4 @@ var http = require("http"),

CookieJar = require("./cookiejar").CookieJar,
encodinglib = require("encoding");
encodinglib = require("encoding"),
net = require("net");

@@ -237,3 +238,3 @@ exports.FetchStream = FetchStream;

if (this.options.asyncDnsLoookup) {
var dnsCallback = (function (err, adresses){
var dnsCallback = (function (err, addresses){
if (err) {

@@ -245,3 +246,3 @@ this.emit("error", err);

url_data.urloptions.headers['host'] = url_data.urloptions.hostname || url_data.urloptions.host;
url_data.urloptions.hostname = adresses[0];
url_data.urloptions.hostname = addresses[0];
url_data.urloptions.host = url_data.urloptions.headers['host'] + (url_data.urloptions.port? ':' + url_data.urloptions.port: '');

@@ -252,3 +253,7 @@

dns.resolve4(url_data.urloptions.host, dnsCallback);
if(net.isIP(url_data.urloptions.host)){
dnsCallback(null, [url_data.urloptions.host]);
}else{
dns.resolve4(url_data.urloptions.host, dnsCallback);
}
} else {

@@ -255,0 +260,0 @@ this._runStream(url_data, url);

{
"name": "fetch",
"description": "Fetch URL contents",
"version": "0.3.5",
"version": "0.3.6",
"author": "Andris Reinman",

@@ -6,0 +6,0 @@ "maintainers": [

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