Skip to content

Cookie parse - failed #652

@gendalf

Description

@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);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions