@@ -64,9 +64,15 @@ var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u00
|
64 | 64 | * <letter> = any one of the 52 alphabetic characters A through Z in |
65 | 65 | * upper case and a through z in lower case |
66 | 66 | * <digit> = any one of the ten digits 0 through 9 |
| 67 | + * |
| 68 | + * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173 |
| 69 | + * |
| 70 | + * > (Note that a leading %x2E ("."), if present, is ignored even though that |
| 71 | + * character is not permitted, but a trailing %x2E ("."), if present, will |
| 72 | + * cause the user agent to ignore the attribute.) |
67 | 73 | */ |
68 | 74 | |
69 | | -var domainValueRegExp = /^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; |
| 75 | +var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; |
70 | 76 | |
71 | 77 | /** |
72 | 78 | * RegExp to match path-value in RFC 6265 sec 4.1.1 |
|