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

http-browserify

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-browserify - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

28.patch

14

index.js

@@ -10,4 +10,16 @@ var http = module.exports;

}
if (!params.host && params.hostname) {
params.host = params.hostname;
}
if (!params.scheme) params.scheme = window.location.protocol.split(':')[0];
if (!params.host) params.host = window.location.hostname;
if (!params.host) {
params.host = window.location.hostname || window.location.host;
}
if (/:/.test(params.host)) {
if (!params.port) {
params.port = params.host.split(':')[1];
}
params.host = params.host.split(':')[0];
}
if (!params.port) params.port = params.scheme == 'https' ? 443 : 80;

@@ -14,0 +26,0 @@

5

lib/request.js

@@ -13,3 +13,4 @@ var Stream = require('stream');

var uri = params.host
self.uri = (params.scheme || 'http') + '://'
+ params.host
+ (params.port ? ':' + params.port : '')

@@ -23,3 +24,3 @@ + (params.path || '/')

params.method || 'GET',
(params.scheme || 'http') + '://' + uri,
self.uri,
true

@@ -26,0 +27,0 @@ );

{
"name": "http-browserify",
"version": "0.2.2",
"version": "0.3.0",
"description": "http module compatability for browserify",

@@ -5,0 +5,0 @@ "main": "index.js",

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