Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-12-16 23:53:38 +0400
committerisaacs <i@izs.me>2013-12-16 23:53:38 +0400
commit7a0c4ad1aa91786091c5e7641415a02eed9608db (patch)
treee1dea146f65923942d98351aa337df678d369ce4 /node_modules/request
parent324d912e7d6084e2ccbfcccec5abd53a889402e6 (diff)
request@2.30.0
Diffstat (limited to 'node_modules/request')
-rwxr-xr-xnode_modules/request/index.js7
-rw-r--r--node_modules/request/node_modules/aws-sign2/package.json6
-rw-r--r--node_modules/request/node_modules/forever-agent/package.json6
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json6
-rw-r--r--node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json6
-rw-r--r--node_modules/request/node_modules/form-data/package.json6
-rwxr-xr-xnode_modules/request/node_modules/hawk/node_modules/boom/package.json6
-rwxr-xr-xnode_modules/request/node_modules/hawk/node_modules/cryptiles/package.json6
-rwxr-xr-xnode_modules/request/node_modules/hawk/node_modules/hoek/package.json6
-rwxr-xr-xnode_modules/request/node_modules/hawk/node_modules/sntp/package.json6
-rwxr-xr-xnode_modules/request/node_modules/hawk/package.json6
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/asn1/package.json6
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json6
-rw-r--r--node_modules/request/node_modules/http-signature/node_modules/ctype/package.json6
-rw-r--r--node_modules/request/node_modules/json-stringify-safe/package.json6
-rw-r--r--node_modules/request/node_modules/mime/package.json6
-rw-r--r--node_modules/request/node_modules/node-uuid/package.json6
-rw-r--r--node_modules/request/node_modules/oauth-sign/package.json6
-rw-r--r--node_modules/request/node_modules/qs/package.json6
-rw-r--r--node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json6
-rw-r--r--node_modules/request/node_modules/tough-cookie/package.json6
-rw-r--r--node_modules/request/node_modules/tunnel-agent/package.json6
-rwxr-xr-xnode_modules/request/package.json10
-rw-r--r--node_modules/request/request.js44
24 files changed, 58 insertions, 129 deletions
diff --git a/node_modules/request/index.js b/node_modules/request/index.js
index dfcdb3d9b..465e5ae3b 100755
--- a/node_modules/request/index.js
+++ b/node_modules/request/index.js
@@ -13,8 +13,9 @@
// limitations under the License.
var optional = require('./lib/optional')
- , Cookie = optional('tough-cookie')
- , CookieJar = Cookie && Cookie.CookieJar
+ , cookie = optional('tough-cookie')
+ , Cookie = cookie && cookie.Cookie
+ , CookieJar = cookie && cookie.CookieJar
, cookieJar = CookieJar && new CookieJar
, copy = require('./lib/copy')
@@ -104,7 +105,7 @@ function requester(params) {
request.forever = function (agentOptions, optionsArg) {
var options = {}
if (optionsArg) {
- for (option in optionsArg) {
+ for (var option in optionsArg) {
options[option] = optionsArg[option]
}
}
diff --git a/node_modules/request/node_modules/aws-sign2/package.json b/node_modules/request/node_modules/aws-sign2/package.json
index 4c22b281f..8fc3ff350 100644
--- a/node_modules/request/node_modules/aws-sign2/package.json
+++ b/node_modules/request/node_modules/aws-sign2/package.json
@@ -24,9 +24,5 @@
},
"homepage": "https://github.com/mikeal/aws-sign",
"_id": "aws-sign2@0.5.0",
- "dist": {
- "shasum": "1385e609eb089432897b2fb794c40373c78d501f"
- },
- "_from": "aws-sign2@~0.5.0",
- "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
+ "_from": "aws-sign2@~0.5.0"
}
diff --git a/node_modules/request/node_modules/forever-agent/package.json b/node_modules/request/node_modules/forever-agent/package.json
index e17c914fe..3ef85a9d2 100644
--- a/node_modules/request/node_modules/forever-agent/package.json
+++ b/node_modules/request/node_modules/forever-agent/package.json
@@ -24,9 +24,5 @@
},
"homepage": "https://github.com/mikeal/forever-agent",
"_id": "forever-agent@0.5.0",
- "dist": {
- "shasum": "ad4cf81ff45de88f2bfacf2592b212a87207d346"
- },
- "_from": "forever-agent@~0.5.0",
- "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.0.tgz"
+ "_from": "forever-agent@~0.5.0"
}
diff --git a/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
index 8a146d927..38341b8a0 100644
--- a/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
+++ b/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
@@ -27,9 +27,5 @@
"url": "https://github.com/felixge/node-delayed-stream/issues"
},
"_id": "delayed-stream@0.0.5",
- "dist": {
- "shasum": "052618e1471edc6f9affd1d89c0b0503c716f5a4"
- },
- "_from": "delayed-stream@0.0.5",
- "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
+ "_from": "delayed-stream@0.0.5"
}
diff --git a/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
index d8683ee01..0dd414162 100644
--- a/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
+++ b/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
@@ -28,9 +28,5 @@
"url": "https://github.com/felixge/node-combined-stream/issues"
},
"_id": "combined-stream@0.0.4",
- "dist": {
- "shasum": "818920f2e68d41ae5fac5f154dfbed98b675d34f"
- },
- "_from": "combined-stream@~0.0.4",
- "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz"
+ "_from": "combined-stream@~0.0.4"
}
diff --git a/node_modules/request/node_modules/form-data/package.json b/node_modules/request/node_modules/form-data/package.json
index beb0878d3..8e5d32562 100644
--- a/node_modules/request/node_modules/form-data/package.json
+++ b/node_modules/request/node_modules/form-data/package.json
@@ -42,9 +42,5 @@
},
"homepage": "https://github.com/felixge/node-form-data",
"_id": "form-data@0.1.2",
- "dist": {
- "shasum": "d02737d14dca53f214486c7da5d42c2aaabf0999"
- },
- "_from": "form-data@~0.1.0",
- "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz"
+ "_from": "form-data@~0.1.0"
}
diff --git a/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/node_modules/request/node_modules/hawk/node_modules/boom/package.json
index 842c450eb..c57a11a39 100755
--- a/node_modules/request/node_modules/hawk/node_modules/boom/package.json
+++ b/node_modules/request/node_modules/hawk/node_modules/boom/package.json
@@ -43,9 +43,5 @@
},
"homepage": "https://github.com/spumko/boom",
"_id": "boom@0.4.2",
- "dist": {
- "shasum": "f0f4575f078f5fe7a3587dd9f999b6fedd482f4c"
- },
- "_from": "boom@0.4.x",
- "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
+ "_from": "boom@0.4.x"
}
diff --git a/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
index d639c6299..cc1f73938 100755
--- a/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
+++ b/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
@@ -44,9 +44,5 @@
},
"homepage": "https://github.com/hueniverse/cryptiles",
"_id": "cryptiles@0.2.2",
- "dist": {
- "shasum": "f063b421b587cb91b0738de6db92e02b9fc30923"
- },
- "_from": "cryptiles@0.2.x",
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
+ "_from": "cryptiles@0.2.x"
}
diff --git a/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
index 8be32590d..e18f14859 100755
--- a/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
+++ b/node_modules/request/node_modules/hawk/node_modules/hoek/package.json
@@ -45,9 +45,5 @@
},
"homepage": "https://github.com/spumko/hoek",
"_id": "hoek@0.9.1",
- "dist": {
- "shasum": "396f2118033eabc93ae5c2cd6ca75f0a89c03592"
- },
- "_from": "hoek@0.9.x",
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
+ "_from": "hoek@0.9.x"
}
diff --git a/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
index c07b6a1b0..4c4b2f579 100755
--- a/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
+++ b/node_modules/request/node_modules/hawk/node_modules/sntp/package.json
@@ -44,9 +44,5 @@
},
"homepage": "https://github.com/hueniverse/sntp",
"_id": "sntp@0.2.4",
- "dist": {
- "shasum": "80612680552b9c47a4ba312d125f366be68ad8f7"
- },
- "_from": "sntp@0.2.x",
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
+ "_from": "sntp@0.2.x"
}
diff --git a/node_modules/request/node_modules/hawk/package.json b/node_modules/request/node_modules/hawk/package.json
index c869191cb..16feb783c 100755
--- a/node_modules/request/node_modules/hawk/package.json
+++ b/node_modules/request/node_modules/hawk/package.json
@@ -49,9 +49,5 @@
},
"homepage": "https://github.com/hueniverse/hawk",
"_id": "hawk@1.0.0",
- "dist": {
- "shasum": "9de06d5c482e1ef66c4873baf34db19863b1a662"
- },
- "_from": "hawk@~1.0.0",
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz"
+ "_from": "hawk@~1.0.0"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
index b3b761c30..79f0b054f 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
@@ -39,9 +39,5 @@
},
"homepage": "https://github.com/mcavage/node-asn1",
"_id": "asn1@0.1.11",
- "dist": {
- "shasum": "115275c87b008d39f95650515e8aa3b95b536106"
- },
- "_from": "asn1@0.1.11",
- "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
+ "_from": "asn1@0.1.11"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
index 16b5c09fb..aaf2e9247 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
@@ -16,9 +16,5 @@
"readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n",
"readmeFilename": "README.md",
"_id": "assert-plus@0.1.2",
- "dist": {
- "shasum": "d4ec5ba2df390500ec8a9867e7e29a742901041c"
- },
- "_from": "assert-plus@0.1.2",
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
+ "_from": "assert-plus@0.1.2"
}
diff --git a/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
index c1763ee4d..edcc649a8 100644
--- a/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
+++ b/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
@@ -14,9 +14,5 @@
"readme": "Node-CType is a way to read and write binary data in structured and easy to use\nformat. Its name comes from the C header file.\n\nTo get started, simply clone the repository or use npm to install it. Once it is\nthere, simply require it.\n\ngit clone git://github.com/rmustacc/node-ctype\nnpm install ctype\nvar mod_ctype = require('ctype')\n\n\nThere are two APIs that you can use, depending on what abstraction you'd like.\nThe low level API let's you read and write individual integers and floats from\nbuffers. The higher level API let's you read and write structures of these. To\nillustrate this, let's looks look at how we would read and write a binary\nencoded x,y point.\n\nIn C we would define this structure as follows:\n\ntypedef struct point {\n\tuint16_t\tp_x;\n\tuint16_t\tp_y;\n} point_t;\n\nTo read a binary encoded point from a Buffer, we first need to create a CType\nparser (where we specify the endian and other options) and add the typedef.\n\nvar parser = new mod_ctype.Parser({ endian: 'big' });\nparser.typedef('point_t', [\n\t{ x: { type: 'uint16_t' } },\n\t{ y: { type: 'uint16_t' } }\n]);\n\nFrom here, given a buffer buf and an offset into it, we can read a point.\n\nvar out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);\nconsole.log(out);\n{ point: { x: 23, y: 42 } }\n\nAnother way to get the same information would be to use the low level methods.\nNote that these require you to manually deal with the offset. Here's how we'd\nget the same values of x and y from the buffer.\n\nvar x = mod_ctype.ruint16(buf, 'big', 0);\nvar y = mod_ctype.ruint16(buf, 'big', 2);\nconsole.log(x + ', ' + y);\n23, 42\n\nThe true power of this API comes from the ability to define and nest typedefs,\njust as you would in C. By default, the following types are defined by default.\nNote that they return a Number, unless indicated otherwise.\n\n * int8_t\n * int16_t\n * int32_t\n * int64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * uint8_t\n * uint16_t\n * uint32_t\n * uint64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * float\n * double\n * char (either returns a buffer with that character or a uint8_t)\n * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)\n\n\nctf2json integration:\n\nNode-CType supports consuming the output of ctf2json. Once you read in a JSON file,\nall you have to do to add all the definitions it contains is:\n\nvar data, parser;\ndata = JSON.parse(parsedJSONData);\nparser = mod_ctype.parseCTF(data, { endian: 'big' });\n\nFor more documentation, see the file README.old. Full documentation is in the\nprocess of being rewritten as a series of manual pages which will be available\nin the repository and online for viewing.\n\nTo read the ctio manual page simple run, from the root of the workspace:\n\nman -Mman -s 3ctype ctio\n",
"readmeFilename": "README",
"_id": "ctype@0.5.2",
- "dist": {
- "shasum": "47401bce9fafcc4de1e2db98fc3fd6f3b854045d"
- },
- "_from": "ctype@0.5.2",
- "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
+ "_from": "ctype@0.5.2"
}
diff --git a/node_modules/request/node_modules/json-stringify-safe/package.json b/node_modules/request/node_modules/json-stringify-safe/package.json
index c38c03b9e..322c23a5a 100644
--- a/node_modules/request/node_modules/json-stringify-safe/package.json
+++ b/node_modules/request/node_modules/json-stringify-safe/package.json
@@ -29,9 +29,5 @@
},
"homepage": "https://github.com/isaacs/json-stringify-safe",
"_id": "json-stringify-safe@5.0.0",
- "dist": {
- "shasum": "4c1f228b5050837eba9d21f50c2e6e320624566e"
- },
- "_from": "json-stringify-safe@~5.0.0",
- "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
+ "_from": "json-stringify-safe@~5.0.0"
}
diff --git a/node_modules/request/node_modules/mime/package.json b/node_modules/request/node_modules/mime/package.json
index d3c59c3cf..a97593921 100644
--- a/node_modules/request/node_modules/mime/package.json
+++ b/node_modules/request/node_modules/mime/package.json
@@ -32,9 +32,5 @@
},
"homepage": "https://github.com/broofa/node-mime",
"_id": "mime@1.2.11",
- "dist": {
- "shasum": "70f951e3276bf9804c66f4ed27321773d71b999c"
- },
- "_from": "mime@~1.2.9",
- "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
+ "_from": "mime@~1.2.9"
}
diff --git a/node_modules/request/node_modules/node-uuid/package.json b/node_modules/request/node_modules/node-uuid/package.json
index 4cc3a3072..22ea8648d 100644
--- a/node_modules/request/node_modules/node-uuid/package.json
+++ b/node_modules/request/node_modules/node-uuid/package.json
@@ -31,9 +31,5 @@
},
"homepage": "https://github.com/broofa/node-uuid",
"_id": "node-uuid@1.4.1",
- "dist": {
- "shasum": "fc22efd9718e4b371d21ddb90bb3840994e5988a"
- },
- "_from": "node-uuid@~1.4.0",
- "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
+ "_from": "node-uuid@~1.4.0"
}
diff --git a/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/request/node_modules/oauth-sign/package.json
index 6822d01a0..dc99a4ec7 100644
--- a/node_modules/request/node_modules/oauth-sign/package.json
+++ b/node_modules/request/node_modules/oauth-sign/package.json
@@ -27,9 +27,5 @@
},
"homepage": "https://github.com/mikeal/oauth-sign",
"_id": "oauth-sign@0.3.0",
- "dist": {
- "shasum": "9afc35fe8d6d035c8373a615fc3a124a6402c9e9"
- },
- "_from": "oauth-sign@~0.3.0",
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
+ "_from": "oauth-sign@~0.3.0"
}
diff --git a/node_modules/request/node_modules/qs/package.json b/node_modules/request/node_modules/qs/package.json
index aa0b47980..313485c0e 100644
--- a/node_modules/request/node_modules/qs/package.json
+++ b/node_modules/request/node_modules/qs/package.json
@@ -34,9 +34,5 @@
},
"homepage": "https://github.com/visionmedia/node-querystring",
"_id": "qs@0.6.6",
- "dist": {
- "shasum": "d088aac10df771c4602df0812f6ef1e93693f414"
- },
- "_from": "qs@~0.6.0",
- "_resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz"
+ "_from": "qs@~0.6.0"
}
diff --git a/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
index 8b6801a8b..0cc83fb22 100644
--- a/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
+++ b/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
@@ -69,9 +69,5 @@
},
"readme": "ERROR: No README data found!",
"_id": "punycode@1.2.3",
- "dist": {
- "shasum": "0af1f294b11513e272c304732a5c1571cfc6f811"
- },
- "_from": "punycode@>=0.2.0",
- "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz"
+ "_from": "punycode@>=0.2.0"
}
diff --git a/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/request/node_modules/tough-cookie/package.json
index c0cb7d8c2..e91645aa1 100644
--- a/node_modules/request/node_modules/tough-cookie/package.json
+++ b/node_modules/request/node_modules/tough-cookie/package.json
@@ -42,9 +42,5 @@
"readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n",
"readmeFilename": "README.md",
"_id": "tough-cookie@0.9.15",
- "dist": {
- "shasum": "c25ddc45f36a712a716b9c31af1c0dcc6b2b0091"
- },
- "_from": "tough-cookie@~0.9.15",
- "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz"
+ "_from": "tough-cookie@~0.9.15"
}
diff --git a/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/request/node_modules/tunnel-agent/package.json
index 1b53b4eb8..3d7492aa8 100644
--- a/node_modules/request/node_modules/tunnel-agent/package.json
+++ b/node_modules/request/node_modules/tunnel-agent/package.json
@@ -24,9 +24,5 @@
},
"homepage": "https://github.com/mikeal/tunnel-agent",
"_id": "tunnel-agent@0.3.0",
- "dist": {
- "shasum": "987d4436dc2264fb29afff470b9b8f3b19600db9"
- },
- "_from": "tunnel-agent@~0.3.0",
- "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz"
+ "_from": "tunnel-agent@~0.3.0"
}
diff --git a/node_modules/request/package.json b/node_modules/request/package.json
index f4e26ca9a..ca42f87d4 100755
--- a/node_modules/request/package.json
+++ b/node_modules/request/package.json
@@ -7,7 +7,7 @@
"util",
"utility"
],
- "version": "2.29.0",
+ "version": "2.30.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -52,10 +52,6 @@
"readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from the `http.Client` option, not the `http.ClientRequest` object)\n2. An `http.ClientResponse` object\n3. The third is the `response` body (`String` or `Buffer`)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n",
"readmeFilename": "README.md",
"homepage": "https://github.com/mikeal/request",
- "_id": "request@2.29.0",
- "dist": {
- "shasum": "919f51c1eec29bfdaa3cadbfbc94e67c9a469e2f"
- },
- "_from": "request@2.29.0",
- "_resolved": "https://registry.npmjs.org/request/-/request-2.29.0.tgz"
+ "_id": "request@2.30.0",
+ "_from": "request@latest"
}
diff --git a/node_modules/request/request.js b/node_modules/request/request.js
index f0f84ab5c..3c03c47da 100644
--- a/node_modules/request/request.js
+++ b/node_modules/request/request.js
@@ -703,38 +703,54 @@ Request.prototype.onResponse = function (response) {
break
case 'Digest':
- // TODO: More complete implementation of RFC 2617. For reference:
+ // TODO: More complete implementation of RFC 2617.
+ // - check challenge.algorithm
+ // - support algorithm="MD5-sess"
+ // - handle challenge.domain
+ // - support qop="auth-int" only
+ // - handle Authentication-Info (not necessarily?)
+ // - check challenge.stale (not necessarily?)
+ // - increase nc (not necessarily?)
+ // For reference:
// http://tools.ietf.org/html/rfc2617#section-3
// https://github.com/bagder/curl/blob/master/lib/http_digest.c
- var matches = authHeader.match(/([a-z0-9_-]+)="([^"]+)"/gi)
var challenge = {}
-
- for (var i = 0; i < matches.length; i++) {
- var eqPos = matches[i].indexOf('=')
- var key = matches[i].substring(0, eqPos)
- var quotedValue = matches[i].substring(eqPos + 1)
- challenge[key] = quotedValue.substring(1, quotedValue.length - 1)
+ var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
+ for (;;) {
+ var match = re.exec(authHeader)
+ if (!match) break
+ challenge[match[1]] = match[2] || match[3];
}
var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
var ha2 = md5(self.method + ':' + self.uri.path)
- var cnonce = uuid().replace(/-/g, '')
- var digestResponse = md5(ha1 + ':' + challenge.nonce + ':1:' + cnonce + ':auth:' + ha2)
+ var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
+ var nc = qop && '00000001'
+ var cnonce = qop && uuid().replace(/-/g, '')
+ var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
var authValues = {
username: self._user,
realm: challenge.realm,
nonce: challenge.nonce,
uri: self.uri.path,
- qop: challenge.qop,
+ qop: qop,
response: digestResponse,
- nc: 1,
- cnonce: cnonce
+ nc: nc,
+ cnonce: cnonce,
+ algorithm: challenge.algorithm,
+ opaque: challenge.opaque
}
authHeader = []
for (var k in authValues) {
- authHeader.push(k + '="' + authValues[k] + '"')
+ if (!authValues[k]) {
+ //ignore
+ } else if (k === 'qop' || k === 'nc' || k === 'algorithm') {
+ authHeader.push(k + '=' + authValues[k])
+ } else {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
}
authHeader = 'Digest ' + authHeader.join(', ')
self.setHeader('authorization', authHeader)