diff --git a/.eslintignore b/.eslintignore index f2213879..3ecff85f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,4 @@ dist lib +.nuxt +.output diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..3ecff85f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +lib +.nuxt +.output diff --git a/docs/2.utils/98.advanced.md b/docs/2.utils/98.advanced.md index d9029207..8c60e374 100644 --- a/docs/2.utils/98.advanced.md +++ b/docs/2.utils/98.advanced.md @@ -42,7 +42,7 @@ Set a cookie value by name. ### `splitCookiesString(cookiesString)` -Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation +Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas that are within a single set-cookie field-value, such as in the Expires portion. This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 Node.js does this for every header _except_ set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation diff --git a/src/utils/cookie.ts b/src/utils/cookie.ts index 98ca9beb..67cf7c47 100644 --- a/src/utils/cookie.ts +++ b/src/utils/cookie.ts @@ -82,7 +82,7 @@ export function deleteCookie( * Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas * that are within a single set-cookie field-value, such as in the Expires portion. * This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 - * Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 + * Node.js does this for every header _except_ set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 * Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 * Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation * @source https://github.com/nfriedly/set-cookie-parser/blob/3eab8b7d5d12c8ed87832532861c1a35520cf5b3/lib/set-cookie.js#L144 diff --git a/test/status.test.ts b/test/status.test.ts index c95d50a5..9304df60 100644 --- a/test/status.test.ts +++ b/test/status.test.ts @@ -6,7 +6,6 @@ import { PlainHandler, eventHandler, setResponseStatus, - send, } from "../src"; describe("setResponseStatus", () => {