diff options
author | Rebecca Turner <me@re-becca.org> | 2015-09-17 00:18:12 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-09-18 01:20:24 +0300 |
commit | 578ca2588791b5a9be67a6044c77df1f303c8c0c (patch) | |
tree | 26124b26e2a5af5dbbee651116e4b01ff624151c /node_modules/request | |
parent | 55f12856b69cf132ac46ec9922e80c9657d66492 (diff) |
request@2.62.0 & qs@5.1.0
Diffstat (limited to 'node_modules/request')
-rw-r--r-- | node_modules/request/.travis.yml | 1 | ||||
-rw-r--r-- | node_modules/request/CHANGELOG.md | 11 | ||||
-rw-r--r-- | node_modules/request/README.md | 6 | ||||
-rwxr-xr-x | node_modules/request/index.js | 2 | ||||
-rw-r--r-- | node_modules/request/package.json | 35 | ||||
-rw-r--r-- | node_modules/request/request.js | 30 |
6 files changed, 52 insertions, 33 deletions
diff --git a/node_modules/request/.travis.yml b/node_modules/request/.travis.yml index 6180cb5d7..d793e7f54 100644 --- a/node_modules/request/.travis.yml +++ b/node_modules/request/.travis.yml @@ -1,5 +1,6 @@ language: node_js node_js: + - "4.0" - "io.js" - "0.12" - "0.10" diff --git a/node_modules/request/CHANGELOG.md b/node_modules/request/CHANGELOG.md index 1e1b02c1d..b0ab18d64 100644 --- a/node_modules/request/CHANGELOG.md +++ b/node_modules/request/CHANGELOG.md @@ -1,5 +1,12 @@ ## Change Log +### v2.62.0 (2015/09/15) +- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov) +- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik) +- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu) +- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@vladimirich) +- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov) + ### v2.61.0 (2015/08/19) - [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz) - [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib) @@ -77,9 +84,9 @@ - [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook) - [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em) - [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB) -- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @simov, @0x4139) +- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nicolasmccurdy, @demohi, @simov, @0x4139) - [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139) -- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy) +- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nicolasmccurdy, @demohi) - [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal) - [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimonz) - [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen) diff --git a/node_modules/request/README.md b/node_modules/request/README.md index 799811370..09091c2ac 100644 --- a/node_modules/request/README.md +++ b/node_modules/request/README.md @@ -221,7 +221,7 @@ Some variations in different HTTP implementations require a newline/CRLF before, uri: 'http://service.com/upload', multipart: [ { - 'content-type': 'application/json' + 'content-type': 'application/json', body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) }, { body: 'I am an attachment' }, @@ -768,7 +768,7 @@ The first argument can be either a `url` or an `options` object. The only requir - `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) - `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. -- `jar` - If `true` and `tough-cookie` is installed, remember cookies for future use (or define your custom cookie jar; see examples section) +- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) --- @@ -1029,7 +1029,7 @@ the server sent a compressed response. }) ``` -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`) and install `tough-cookie`. +Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). ```js var request = request.defaults({jar: true}) diff --git a/node_modules/request/index.js b/node_modules/request/index.js index d13ab96b2..4d0c748da 100755 --- a/node_modules/request/index.js +++ b/node_modules/request/index.js @@ -105,6 +105,8 @@ function wrapRequestMethod (method, options, requester, verb) { request.defaults = function (options, requester) { var self = this + options = options || {} + if (typeof options === 'function') { requester = options options = {} diff --git a/node_modules/request/package.json b/node_modules/request/package.json index f441d5bc6..4a6affdfb 100644 --- a/node_modules/request/package.json +++ b/node_modules/request/package.json @@ -1,37 +1,38 @@ { "_args": [ [ - "request@2.61.0", + "request@~2.62.0", "/Users/rebecca/code/npm" ] ], - "_from": "request@2.61.0", - "_id": "request@2.61.0", + "_from": "request@>=2.62.0 <2.63.0", + "_id": "request@2.62.0", "_inCache": true, "_location": "/request", - "_nodeVersion": "0.12.6", + "_nodeVersion": "4.0.0", "_npmUser": { "email": "simeonvelichkov@gmail.com", "name": "simov" }, - "_npmVersion": "2.11.2", + "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { "name": "request", - "raw": "request@2.61.0", - "rawSpec": "2.61.0", + "raw": "request@~2.62.0", + "rawSpec": "~2.62.0", "scope": null, - "spec": "2.61.0", - "type": "version" + "spec": ">=2.62.0 <2.63.0", + "type": "range" }, "_requiredBy": [ + "/", "/node-gyp", "/npm-registry-client" ], - "_resolved": "https://registry.npmjs.org/request/-/request-2.61.0.tgz", - "_shasum": "6973cb2ac94885f02693f554eec64481d6013f9f", + "_resolved": "https://registry.npmjs.org/request/-/request-2.62.0.tgz", + "_shasum": "55c165f702a146f1e21e0725c0b75e1136487b0f", "_shrinkwrap": null, - "_spec": "request@2.61.0", + "_spec": "request@~2.62.0", "_where": "/Users/rebecca/code/npm", "author": { "email": "mikeal.rogers@gmail.com", @@ -56,7 +57,7 @@ "mime-types": "~2.1.2", "node-uuid": "~1.4.0", "oauth-sign": "~0.8.0", - "qs": "~4.0.0", + "qs": "~5.1.0", "stringstream": "~0.0.4", "tough-cookie": ">=0.12.0", "tunnel-agent": "~0.4.0" @@ -85,13 +86,13 @@ }, "directories": {}, "dist": { - "shasum": "6973cb2ac94885f02693f554eec64481d6013f9f", - "tarball": "http://registry.npmjs.org/request/-/request-2.61.0.tgz" + "shasum": "55c165f702a146f1e21e0725c0b75e1136487b0f", + "tarball": "http://registry.npmjs.org/request/-/request-2.62.0.tgz" }, "engines": { "node": ">=0.8.0" }, - "gitHead": "8492d18add93af1214943ee12e25371f9f9adad3", + "gitHead": "9cda443b62b33d077dc002aefd19e0b267df9cfa", "homepage": "https://github.com/request/request#readme", "installable": true, "license": "Apache-2.0", @@ -133,5 +134,5 @@ "util", "utility" ], - "version": "2.61.0" + "version": "2.62.0" } diff --git a/node_modules/request/request.js b/node_modules/request/request.js index 700b9e0a9..af91a11d3 100644 --- a/node_modules/request/request.js +++ b/node_modules/request/request.js @@ -256,17 +256,7 @@ Request.prototype.init = function (options) { // Support Unix Sockets if (self.uri.host === 'unix') { - // Get the socket & request paths from the URL - var unixParts = self.uri.path.split(':') - , host = unixParts[0] - , path = unixParts[1] - // Apply unix properties to request - self.socketPath = host - self.uri.pathname = path - self.uri.path = path - self.uri.host = host - self.uri.hostname = host - self.uri.isUnix = true + self.enableUnixSocket() } if (self.strictSSL === false) { @@ -1163,6 +1153,10 @@ Request.prototype.qs = function (q, clobber) { self.url = self.uri self.path = self.uri.path + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + return self } Request.prototype.form = function (form) { @@ -1246,6 +1240,20 @@ Request.prototype.getHeader = function (name, headers) { }) return result } +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + , host = unixParts[0] + , path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} + Request.prototype.auth = function (user, pass, sendImmediately, bearer) { var self = this |