Comparing version 2.5.0 to 2.6.0
2.6.0 / 2015-12-09 | ||
================== | ||
* test: fix unstable test cases | ||
* feat: enhance global events | ||
* chore(package): update semver to version 5.1.0 | ||
* chore(package): update should to version 7.1.1 | ||
2.5.0 / 2015-09-30 | ||
@@ -3,0 +11,0 @@ ================== |
@@ -52,2 +52,3 @@ /**! | ||
var REQUEST_ID = 0; | ||
var MAX_VALUE = Math.pow(2, 31) - 10; | ||
@@ -180,2 +181,15 @@ /** | ||
args = args || {}; | ||
if (REQUEST_ID >= MAX_VALUE) { | ||
REQUEST_ID = 0; | ||
} | ||
var reqId = ++REQUEST_ID; | ||
if (args.emitter) { | ||
args.emitter.emit('request', { | ||
requestId: reqId, | ||
url: url, | ||
args: args, | ||
}); | ||
} | ||
args.timeout = args.timeout || exports.TIMEOUT; | ||
@@ -377,2 +391,3 @@ args.maxRedirects = args.maxRedirects || 10; | ||
args.emitter.emit('response', { | ||
requestId: reqId, | ||
error: err, | ||
@@ -382,2 +397,3 @@ ctx: args.ctx, | ||
url: url, | ||
socket: req && req.connection, | ||
options: options, | ||
@@ -450,3 +466,2 @@ size: requestSize, | ||
var reqId = ++REQUEST_ID; | ||
debug('Request#%d %s %s with headers %j, options.path: %s', | ||
@@ -453,0 +468,0 @@ reqId, method, url, options.headers, options.path); |
{ | ||
"name": "urllib", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more.", | ||
@@ -52,4 +52,4 @@ "keywords": [ | ||
"pedding": "1", | ||
"semver": "4", | ||
"should": "6", | ||
"semver": "5.1.0", | ||
"should": "7.1.1", | ||
"should-http": "*", | ||
@@ -56,0 +56,0 @@ "tar": "2" |
46727
715