Security update for permissions_by_term
[yaffs-website] / node_modules / uncss / node_modules / tough-cookie / README.md
1 [RFC6265](https://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js
2
3 [![Build Status](https://travis-ci.org/SalesforceEng/tough-cookie.png?branch=master)](https://travis-ci.org/SalesforceEng/tough-cookie)
4
5 [![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)
6 ![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)
7
8 # Synopsis
9
10 ``` javascript
11 var tough = require('tough-cookie');
12 var Cookie = tough.Cookie;
13 var cookie = Cookie.parse(header);
14 cookie.value = 'somethingdifferent';
15 header = cookie.toString();
16
17 var cookiejar = new tough.CookieJar();
18 cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
19 // ...
20 cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {
21   res.headers['cookie'] = cookies.join('; ');
22 });
23 ```
24
25 # Installation
26
27 It's _so_ easy!
28
29 `npm install tough-cookie`
30
31 Why the name?  NPM modules `cookie`, `cookies` and `cookiejar` were already taken.
32
33 # API
34
35 ## tough
36
37 Functions on the module you get from `require('tough-cookie')`.  All can be used as pure functions and don't need to be "bound".
38
39 **Note**: prior to 1.0.x, several of these functions took a `strict` parameter. This has since been removed from the API as it was no longer necessary.
40
41 ### `parseDate(string)`
42
43 Parse a cookie date string into a `Date`.  Parses according to RFC6265 Section 5.1.1, not `Date.parse()`.
44
45 ### `formatDate(date)`
46
47 Format a Date into a RFC1123 string (the RFC6265-recommended format).
48
49 ### `canonicalDomain(str)`
50
51 Transforms 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).
52
53 ### `domainMatch(str,domStr[,canonicalize=true])`
54
55 Answers "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".
56
57 The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.
58
59 ### `defaultPath(path)`
60
61 Given 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.
62
63 The `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.
64
65 ### `pathMatch(reqPath,cookiePath)`
66
67 Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4.  Returns a boolean.
68
69 This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.
70
71 ### `parse(cookieString[, options])`
72
73 alias for `Cookie.parse(cookieString[, options])`
74
75 ### `fromJSON(string)`
76
77 alias for `Cookie.fromJSON(string)`
78
79 ### `getPublicSuffix(hostname)`
80
81 Returns 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.
82
83 For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.
84
85 For further information, see http://publicsuffix.org/.  This module derives its list from that site.
86
87 ### `cookieCompare(a,b)`
88
89 For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). The sort algorithm is, in order of precedence:
90
91 * Longest `.path`
92 * oldest `.creation` (which has a 1ms precision, same as `Date`)
93 * lowest `.creationIndex` (to get beyond the 1ms precision)
94
95 ``` javascript
96 var cookies = [ /* unsorted array of Cookie objects */ ];
97 cookies = cookies.sort(cookieCompare);
98 ```
99
100 **Note**: Since JavaScript's `Date` is limited to a 1ms precision, cookies within the same milisecond are entirely possible. This is especially true when using the `now` option to `.setCookie()`. The `.creationIndex` property is a per-process global counter, assigned during construction with `new Cookie()`. This preserves the spirit of the RFC sorting: older cookies go first. This works great for `MemoryCookieStore`, since `Set-Cookie` headers are parsed in order, but may not be so great for distributed systems. Sophisticated `Store`s may wish to set this to some other _logical clock_ such that if cookies A and B are created in the same millisecond, but cookie A is created before cookie B, then `A.creationIndex < B.creationIndex`. If you want to alter the global counter, which you probably _shouldn't_ do, it's stored in `Cookie.cookiesCreated`.
101
102 ### `permuteDomain(domain)`
103
104 Generates a list of all possible domains that `domainMatch()` the parameter.  May be handy for implementing cookie stores.
105
106 ### `permutePath(path)`
107
108 Generates a list of all possible paths that `pathMatch()` the parameter.  May be handy for implementing cookie stores.
109
110
111 ## Cookie
112
113 Exported via `tough.Cookie`.
114
115 ### `Cookie.parse(cookieString[, options])`
116
117 Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object.  Returns `undefined` if the string can't be parsed.
118
119 The options parameter is not required and currently has only one property:
120
121   * _loose_ - boolean - if `true` enable parsing of key-less cookies like `=abc` and `=`, which are not RFC-compliant.
122
123 If options is not an object, it is ignored, which means you can use `Array#map` with it.
124
125 Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:
126
127 ``` javascript
128 if (res.headers['set-cookie'] instanceof Array)
129   cookies = res.headers['set-cookie'].map(Cookie.parse);
130 else
131   cookies = [Cookie.parse(res.headers['set-cookie'])];
132 ```
133
134 ### Properties
135
136 Cookie object properties:
137
138   * _key_ - string - the name or key of the cookie (default "")
139   * _value_ - string - the value of the cookie (default "")
140   * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()`
141   * _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()`
142   * _domain_ - string - the `Domain=` attribute of the cookie
143   * _path_ - string - the `Path=` of the cookie
144   * _secure_ - boolean - the `Secure` cookie flag
145   * _httpOnly_ - boolean - the `HttpOnly` cookie flag
146   * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)
147   * _creation_ - `Date` - when this cookie was constructed
148   * _creationIndex_ - number - set at construction, used to provide greater sort precision (please see `cookieCompare(a,b)` for a full explanation)
149
150 After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:
151
152   * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)
153   * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.
154   * _creation_ - `Date` - **modified** from construction to when the cookie was added to the jar
155   * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented.  Using `cookiejar.getCookies(...)` will update this attribute.
156
157 ### `Cookie([{properties}])`
158
159 Receives an options object that can contain any of the above Cookie properties, uses the default for unspecified properties.
160
161 ### `.toString()`
162
163 encode to a Set-Cookie header value.  The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.
164
165 ### `.cookieString()`
166
167 encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').
168
169 ### `.setExpires(String)`
170
171 sets 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.
172
173 ### `.setMaxAge(number)`
174
175 sets the maxAge in seconds.  Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly.
176
177 ### `.expiryTime([now=Date.now()])`
178
179 ### `.expiryDate([now=Date.now()])`
180
181 expiryTime() 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.
182
183 Max-Age takes precedence over Expires (as per the RFC). The `.creation` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.
184
185 If Expires (`.expires`) is set, that's returned.
186
187 Otherwise, `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).
188
189 ### `.TTL([now=Date.now()])`
190
191 compute the TTL relative to `now` (milliseconds).  The same precedence rules as for `expiryTime`/`expiryDate` apply.
192
193 The "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.
194
195 ### `.canonicalizedDoman()`
196
197 ### `.cdomain()`
198
199 return the canonicalized `.domain` field.  This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.
200
201 ### `.toJSON()`
202
203 For convenience in using `JSON.serialize(cookie)`. Returns a plain-old `Object` that can be JSON-serialized.
204
205 Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are exported in ISO format (`.toISOString()`).
206
207 **NOTE**: Custom `Cookie` properties will be discarded. In tough-cookie 1.x, since there was no `.toJSON` method explicitly defined, all enumerable properties were captured. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
208
209 ### `Cookie.fromJSON(strOrObj)`
210
211 Does the reverse of `cookie.toJSON()`. If passed a string, will `JSON.parse()` that first.
212
213 Any `Date` properties (i.e., `.expires`, `.creation`, and `.lastAccessed`) are parsed via `Date.parse()`, not the tough-cookie `parseDate`, since it's JavaScript/JSON-y timestamps being handled at this layer.
214
215 Returns `null` upon JSON parsing error.
216
217 ### `.clone()`
218
219 Does a deep clone of this cookie, exactly implemented as `Cookie.fromJSON(cookie.toJSON())`.
220
221 ### `.validate()`
222
223 Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.
224
225 validates 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:
226
227 ``` javascript
228 if (cookie.validate() === true) {
229   // it's tasty
230 } else {
231   // yuck!
232 }
233 ```
234
235
236 ## CookieJar
237
238 Exported via `tough.CookieJar`.
239
240 ### `CookieJar([store],[options])`
241
242 Simply 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.
243
244 The `options` object can be omitted and can have the following properties:
245
246   * _rejectPublicSuffixes_ - boolean - default `true` - reject cookies with domains like "com" and "co.uk"
247   * _looseMode_ - boolean - default `false` - accept malformed cookies like `bar` and `=bar`, which have an implied empty name.
248     This is not in the standard, but is used sometimes on the web and is accepted by (most) browsers.
249
250 Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.
251
252 ### `.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))`
253
254 Attempt 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 `.creation`, `.lastAccessed` and `.hostOnly` properties.
255
256 The `options` object can be omitted and can have the following properties:
257
258   * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API.  Affects HttpOnly cookies.
259   * _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`.
260   * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
261   * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains.  `Store` errors aren't ignored by this option.
262
263 As 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).
264
265 ### `.setCookieSync(cookieOrString, currentUrl, [{options}])`
266
267 Synchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
268
269 ### `.getCookies(currentUrl, [{options},] cb(err,cookies))`
270
271 Retrieve the list of cookies that can be sent in a Cookie header for the current url.
272
273 If 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.
274
275 The `options` object can be omitted and can have the following properties:
276
277   * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API.  Affects HttpOnly cookies.
278   * _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`.
279   * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies
280   * _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).
281   * _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 underlying store (the default `MemoryCookieStore` supports it).
282
283 The `.lastAccessed` property of the returned cookies will have been updated.
284
285 ### `.getCookiesSync(currentUrl, [{options}])`
286
287 Synchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
288
289 ### `.getCookieString(...)`
290
291 Accepts 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()`.
292
293 ### `.getCookieStringSync(...)`
294
295 Synchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
296
297 ### `.getSetCookieStrings(...)`
298
299 Returns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`.  Simply maps the cookie array via `.toString()`.
300
301 ### `.getSetCookieStringsSync(...)`
302
303 Synchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).
304
305 ### `.serialize(cb(err,serializedObject))`
306
307 Serialize the Jar if the underlying store supports `.getAllCookies`.
308
309 **NOTE**: Custom `Cookie` properties will be discarded. If you want a property to be serialized, add the property name to the `Cookie.serializableProperties` Array.
310
311 See [Serialization Format].
312
313 ### `.serializeSync()`
314
315 Sync version of .serialize
316
317 ### `.toJSON()`
318
319 Alias of .serializeSync() for the convenience of `JSON.stringify(cookiejar)`.
320
321 ### `CookieJar.deserialize(serialized, [store], cb(err,object))`
322
323 A new Jar is created and the serialized Cookies are added to the underlying store. Each `Cookie` is added via `store.putCookie` in the order in which they appear in the serialization.
324
325 The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created.
326
327 As a convenience, if `serialized` is a string, it is passed through `JSON.parse` first. If that throws an error, this is passed to the callback.
328
329 ### `CookieJar.deserializeSync(serialized, [store])`
330
331 Sync version of `.deserialize`.  _Note_ that the `store` must be synchronous for this to work.
332
333 ### `CookieJar.fromJSON(string)`
334
335 Alias of `.deserializeSync` to provide consistency with `Cookie.fromJSON()`.
336
337 ### `.clone([store,]cb(err,newJar))`
338
339 Produces a deep clone of this jar. Modifications to the original won't affect the clone, and vice versa.
340
341 The `store` argument is optional, but should be an instance of `Store`. By default, a new instance of `MemoryCookieStore` is created. Transferring between store types is supported so long as the source implements `.getAllCookies()` and the destination implements `.putCookie()`.
342
343 ### `.cloneSync([store])`
344
345 Synchronous version of `.clone`, returning a new `CookieJar` instance.
346
347 The `store` argument is optional, but must be a _synchronous_ `Store` instance if specified. If not passed, a new instance of `MemoryCookieStore` is used.
348
349 The _source_ and _destination_ must both be synchronous `Store`s. If one or both stores are asynchronous, use `.clone` instead. Recall that `MemoryCookieStore` supports both synchronous and asynchronous API calls.
350
351 ## Store
352
353 Base class for CookieJar stores. Available as `tough.Store`.
354
355 ## Store API
356
357 The 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.
358
359 Stores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`.
360
361 Stores are asynchronous by default, but if `store.synchronous` is set to `true`, then the `*Sync` methods on the of the containing `CookieJar` can be used (however, the continuation-passing style
362
363 All `domain` parameters will have been normalized before calling.
364
365 The Cookie store must have all of the following methods.
366
367 ### `store.findCookie(domain, path, key, cb(err,cookie))`
368
369 Retrieve 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.
370
371 Callback takes an error and the resulting `Cookie` object.  If no cookie is found then `null` MUST be passed instead (i.e. not an error).
372
373 ### `store.findCookies(domain, path, cb(err,cookies))`
374
375 Locates cookies matching the given domain and path.  This is most often called in the context of `cookiejar.getCookies()` above.
376
377 If no cookies are found, the callback MUST be passed an empty array.
378
379 The 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.
380
381 As 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).
382
383 ### `store.putCookie(cookie, cb(err))`
384
385 Adds 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.
386
387 The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.
388
389 Pass an error if the cookie cannot be stored.
390
391 ### `store.updateCookie(oldCookie, newCookie, cb(err))`
392
393 Update 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.
394
395 The `.lastAccessed` property will always be different between the two objects (to the precision possible via JavaScript's clock).  Both `.creation` and `.creationIndex` are guaranteed to be the same.  Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are selected for automatic deletion (e.g., least-recently-used, which is up to the store to implement).
396
397 Stores 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.
398
399 The `newCookie` and `oldCookie` objects MUST NOT be modified.
400
401 Pass an error if the newCookie cannot be stored.
402
403 ### `store.removeCookie(domain, path, key, cb(err))`
404
405 Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).
406
407 The 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.
408
409 ### `store.removeCookies(domain, path, cb(err))`
410
411 Removes matching cookies from the store.  The `path` parameter is optional, and if missing means all paths in a domain should be removed.
412
413 Pass an error ONLY if removing any existing cookies failed.
414
415 ### `store.getAllCookies(cb(err, cookies))`
416
417 Produces an `Array` of all cookies during `jar.serialize()`. The items in the array can be true `Cookie` objects or generic `Object`s with the [Serialization Format] data structure.
418
419 Cookies SHOULD be returned in creation order to preserve sorting via `compareCookies()`. For reference, `MemoryCookieStore` will sort by `.creationIndex` since it uses true `Cookie` objects internally. If you don't return the cookies in creation order, they'll still be sorted by creation time, but this only has a precision of 1ms.  See `compareCookies` for more detail.
420
421 Pass an error if retrieval fails.
422
423 ## MemoryCookieStore
424
425 Inherits from `Store`.
426
427 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.
428
429 # Serialization Format
430
431 **NOTE**: if you want to have custom `Cookie` properties serialized, add the property name to `Cookie.serializableProperties`.
432
433 ```js
434   {
435     // The version of tough-cookie that serialized this jar.
436     version: 'tough-cookie@1.x.y',
437
438     // add the store type, to make humans happy:
439     storeType: 'MemoryCookieStore',
440
441     // CookieJar configuration:
442     rejectPublicSuffixes: true,
443     // ... future items go here
444
445     // Gets filled from jar.store.getAllCookies():
446     cookies: [
447       {
448         key: 'string',
449         value: 'string',
450         // ...
451         /* other Cookie.serializableProperties go here */
452       }
453     ]
454   }
455 ```
456
457 # Copyright and License
458
459 (tl;dr: BSD-3-Clause with some MPL/2.0)
460
461 ```text
462  Copyright (c) 2015, Salesforce.com, Inc.
463  All rights reserved.
464
465  Redistribution and use in source and binary forms, with or without
466  modification, are permitted provided that the following conditions are met:
467
468  1. Redistributions of source code must retain the above copyright notice,
469  this list of conditions and the following disclaimer.
470
471  2. Redistributions in binary form must reproduce the above copyright notice,
472  this list of conditions and the following disclaimer in the documentation
473  and/or other materials provided with the distribution.
474
475  3. Neither the name of Salesforce.com nor the names of its contributors may
476  be used to endorse or promote products derived from this software without
477  specific prior written permission.
478
479  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
480  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
481  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
482  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
483  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
484  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
485  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
486  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
487  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
488  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
489  POSSIBILITY OF SUCH DAMAGE.
490 ```
491
492 Portions may be licensed under different licenses (in particular `public_suffix_list.dat` is MPL/2.0); please read that file and the LICENSE file for full details.