diff options
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/tough-cookie')
3 files changed, 60 insertions, 42 deletions
diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md index 9899dbf6ee..126f222b90 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/README.md +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/README.md @@ -1,9 +1,8 @@ [RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js -[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie) +[![npm package](https://nodei.co/npm/tough-cookie.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/tough-cookie/) -[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie) -![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9) +[![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie) # Synopsis @@ -30,6 +29,10 @@ It's _so_ easy! Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. +## Version Support + +Support for versions of node.js will follow that of the [request](https://www.npmjs.com/package/request) module. + # API ## tough @@ -426,6 +429,17 @@ Inherits from `Store`. A just-in-memory CookieJar synchronous store implementation, used by default. Despite being a synchronous implementation, it's usable with both the synchronous and asynchronous forms of the `CookieJar` API. +## Community Cookie Stores + +These are some Store implementations authored and maintained by the community. They aren't official and we don't vouch for them but you may be interested to have a look: + +- [`db-cookie-store`](https://github.com/JSBizon/db-cookie-store): SQL including SQLite-based databases +- [`file-cookie-store`](https://github.com/JSBizon/file-cookie-store): Netscape cookie file format on disk +- [`redis-cookie-store`](https://github.com/benkroeger/redis-cookie-store): Redis +- [`tough-cookie-filestore`](https://github.com/mitsuru/tough-cookie-filestore): JSON on disk +- [`tough-cookie-web-storage-store`](https://github.com/exponentjs/tough-cookie-web-storage-store): DOM localStorage and sessionStorage + + # Serialization Format **NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`. diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js index 12da297ac4..c3dacfe44a 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/lib/cookie.js @@ -68,9 +68,6 @@ var LOOSE_COOKIE_PAIR = /^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/; // Note ';' is \x3B var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; -// Used for checking whether or not there is a trailing semi-colon -var TRAILING_SEMICOLON = /;+$/; - var DAY_OF_MONTH = /^(\d{1,2})[^\d]*$/; var TIME = /^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/; var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i; @@ -327,12 +324,6 @@ function parse(str, options) { } str = str.trim(); - // S4.1.1 Trailing semi-colons are not part of the specification. - var semiColonCheck = TRAILING_SEMICOLON.exec(str); - if (semiColonCheck) { - str = str.slice(0, semiColonCheck.index); - } - // We use a regex to parse the "name-value-pair" part of S5.2 var firstSemi = str.indexOf(';'); // S5.2 step 1 var pairRe = options.loose ? LOOSE_COOKIE_PAIR : COOKIE_PAIR; @@ -362,7 +353,7 @@ function parse(str, options) { // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string // (including the %x3B (";") in question)." plus later on in the same section // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); + var unparsed = str.slice(firstSemi + 1).trim(); // "If the unparsed-attributes string is empty, skip the rest of these // steps." @@ -378,9 +369,12 @@ function parse(str, options) { * cookie-attribute-list". Therefore, in this implementation, we overwrite * the previous value. */ - var cookie_avs = unparsed.split(/\s*;\s*/); + var cookie_avs = unparsed.split(';'); while (cookie_avs.length) { - var av = cookie_avs.shift(); + var av = cookie_avs.shift().trim(); + if (av.length === 0) { // happens if ";;" appears + continue; + } var av_sep = av.indexOf('='); var av_key, av_value; diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json index 565dbe1914..ca65ee5216 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json @@ -1,45 +1,54 @@ { "_args": [ [ - "tough-cookie@~2.2.0", + { + "raw": "tough-cookie@~2.3.0", + "scope": null, + "escapedName": "tough-cookie", + "name": "tough-cookie", + "rawSpec": "~2.3.0", + "spec": ">=2.3.0 <2.4.0", + "type": "range" + }, "/Users/rebecca/code/npm/node_modules/request" ] ], - "_from": "tough-cookie@>=2.2.0 <2.3.0", - "_id": "tough-cookie@2.2.2", + "_from": "tough-cookie@>=2.3.0 <2.4.0", + "_id": "tough-cookie@2.3.1", "_inCache": true, "_installable": true, "_location": "/request/tough-cookie", - "_nodeVersion": "5.1.1", + "_nodeVersion": "6.3.1", "_npmOperationalInternal": { - "host": "packages-13-west.internal.npmjs.com", - "tmp": "tmp/tough-cookie-2.2.2.tgz_1457564639182_0.5129188685677946" + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/tough-cookie-2.3.1.tgz_1469494891088_0.8524557144846767" }, "_npmUser": { - "email": "jstash@gmail.com", - "name": "jstash" + "name": "jstash", + "email": "jstash@gmail.com" }, - "_npmVersion": "3.3.12", + "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { - "name": "tough-cookie", - "raw": "tough-cookie@~2.2.0", - "rawSpec": "~2.2.0", + "raw": "tough-cookie@~2.3.0", "scope": null, - "spec": ">=2.2.0 <2.3.0", + "escapedName": "tough-cookie", + "name": "tough-cookie", + "rawSpec": "~2.3.0", + "spec": ">=2.3.0 <2.4.0", "type": "range" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz", - "_shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz", + "_shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd", "_shrinkwrap": null, - "_spec": "tough-cookie@~2.2.0", + "_spec": "tough-cookie@~2.3.0", "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { - "email": "jstashewsky@salesforce.com", - "name": "Jeremy Stashewsky" + "name": "Jeremy Stashewsky", + "email": "jstashewsky@salesforce.com" }, "bugs": { "url": "https://github.com/SalesforceEng/tough-cookie/issues" @@ -68,20 +77,21 @@ "description": "RFC6265 Cookies and Cookie Jar for node.js", "devDependencies": { "async": "^1.4.2", + "string.prototype.repeat": "^0.2.0", "vows": "^0.8.1" }, "directories": {}, "dist": { - "shasum": "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7", - "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz" + "shasum": "99c77dfbb7d804249e8a299d4cb0fd81fef083fd", + "tarball": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.8" }, "files": [ "lib" ], - "gitHead": "cc46628c4d7d2e8c372ecba29293ca8a207ec192", + "gitHead": "c11a2d11d12348a35ef595c809e30e641a804a7d", "homepage": "https://github.com/SalesforceEng/tough-cookie", "keywords": [ "HTTP", @@ -97,12 +107,12 @@ "main": "./lib/cookie", "maintainers": [ { - "email": "jeremy@goinstant.com", - "name": "jstash" + "name": "jstash", + "email": "jstash@gmail.com" }, { - "email": "services@goinstant.com", - "name": "goinstant" + "name": "nexxy", + "email": "emily@contactvibe.com" } ], "name": "tough-cookie", @@ -116,5 +126,5 @@ "suffixup": "curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js", "test": "vows test/*_test.js" }, - "version": "2.2.2" + "version": "2.3.1" } |