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

urllib

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urllib - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

5

History.md
0.3.8 / 2013-08-02
==================
* add debug log
0.3.7 / 2013-07-11

@@ -3,0 +8,0 @@ ==================

17

lib/urllib.js

@@ -12,2 +12,3 @@ /**

var fs = require('fs');
var debug = require('debug')('urllib');
var pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../', 'package.json')));

@@ -32,2 +33,3 @@

var REQUEST_ID = 0;

@@ -151,2 +153,3 @@ /**

var reqId = ++REQUEST_ID;
// make request

@@ -193,2 +196,3 @@ var req = httplib.request(options, function (res) {

res.on('data', function (chunk) {
debug('Request#%d %s: `data` event emit, size %d', reqId, options.path, chunk.length);
size += chunk.length;

@@ -198,3 +202,8 @@ chunks.push(chunk);

res.on('close', function () {
debug('Request#%d %s: `close` event emit, total size %d', reqId, options.path, size);
});
res.on('end', function () {
debug('Request#%d %s: `end` event emit, total size %d', reqId, options.path, size);
var data = Buffer.concat(chunks, size);

@@ -218,3 +227,4 @@ var err = null;

timer = null;
__err = new Error('Request timeout for ' + timeout + 'ms.');
var msg = 'Request#' + reqId + ' timeout for ' + timeout + 'ms';
__err = new Error(msg);
__err.name = 'RequestTimeoutError';

@@ -228,3 +238,5 @@ req.abort();

}
done(__err || err);
err = __err || err;
debug('Request#%d %s %s: %s', reqId, options.path, err.name, err.message);
done(err);
});

@@ -249,3 +261,4 @@

req.requestId = reqId;
return req;
};

5

package.json
{
"name": "urllib",
"version": "0.3.7",
"version": "0.3.8",
"description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more.",

@@ -19,3 +19,4 @@ "keywords": [ "urllib", "http", "urlopen", "curl", "wget" ],

"dependencies": {
"buffer-concat": "0.0.1"
"buffer-concat": "0.0.1",
"debug": "0.7.2"
},

@@ -22,0 +23,0 @@ "devDependencies": {

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