Skip to content
Myr

Accept unusual keys in cookies.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The Oreos module throws CookieErrors when it catches keys that have characters that shouldn't be in them, like colons and braces. Other services are happy to send out such keys, however. This commit makes requests non-standards compliant, just like everyone else is.

authored by Cory Benfield · committed by Cory Benfield · parent b7842ab · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:requests/packages/oreos/monkeys.py+2 added-1 removed
250 unmodified lines
251# These are taken from RFC2068 and RFC2109.252# _LegalChars is the list of chars which don't require "'s253# _Translator hash-table for fast quoting254#255_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~[]_"255_LegalChars = ( string.ascii_letters + string.digits + 256 "!#$%&'*+-.^_`|~[]_:{}" )257_Translator = {258 '\000' : '\\000', '\001' : '\\001', '\002' : '\\002',259 '\003' : '\\003', '\004' : '\\004', '\005' : '\\005',260 '\006' : '\\006', '\007' : '\\007', '\010' : '\\010',
511 unmodified lines
modified:AUTHORS.rst+1 added
78 unmodified lines
79- Ben Toews (mastahyeti)80- David Kemp81- Brendon Crawford82- Denis (Telofy)83- Cory Benfield (Lukasa)