Skip to content

Commit 1730d38

Browse files
committed
Make bad cookie logic more obvious on what it is checking for
1 parent e25d725 commit 1730d38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookiejar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
var key = pair[1];
8080
var value = pair[2];
81-
if (!key || !value) {
81+
if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) {
8282
console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'");
8383
return;
8484
}

0 commit comments

Comments
 (0)