Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cookie parse - failed #652

Closed
gendalf opened this Issue · 1 comment

3 participants

gendalf Roman Shtylman jongleberry
gendalf

After put node+connect in production 5% of request kill server... (multilanguage project)

CAUSE: Not always cookies is encoded with URIComponent, many requests have encoded cookies with escape
Patch lines in cookie/index.js

WAS:
obj[key] = decode(val)

My code for production:
try {
obj[key] = decode(val);
} catch(err) {
try {
obj[key] = unescape(val);
} catch(err){
console.log('FAIL DECODE COOKIE:', val);
}
}

Roman Shtylman defunctzombie referenced this issue in jshttp/cookie
Closed

Error when decoding URI component #5

Roman Shtylman

Can you provide an example of a valid cookie which is not a valid URI or cannot be decoded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.