summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--std/http/cookie.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/std/http/cookie.ts b/std/http/cookie.ts
index f8025d328..90f33ae98 100644
--- a/std/http/cookie.ts
+++ b/std/http/cookie.ts
@@ -83,13 +83,12 @@ function toString(cookie: Cookie): string {
}
/**
- * Validate Cookie property.
- * @param key Name of the cookie.
- * @param value Value of the cookie.
+ * Validate Cookie Name.
+ * @param name Cookie name.
*/
-function validateCookieName(value: string | undefined | null): void {
- if (value && !FIELD_CONTENT_REGEXP.test(value)) {
- throw new TypeError(`Invalid cookie name: "${value}".`);
+function validateCookieName(name: string | undefined | null): void {
+ if (name && !FIELD_CONTENT_REGEXP.test(name)) {
+ throw new TypeError(`Invalid cookie name: "${name}".`);
}
}