Issue991266
Created on 2004-07-15 00:17 by zenzen, last changed 2009-02-18 15:07 by ajaksu2.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
991266test.patch
|
zdobersek,
2009-02-14 17:14
|
Patch to test_cookie.py |
|
|
|
991266fix.patch
|
zdobersek,
2009-02-18 14:40
|
Fix - properly quote cookie's comment |
|
|
|
msg60528 - (view) |
Author: Stuart Bishop (zenzen) |
Date: 2004-07-15 00:17 |
|
The quoting works fine for cookie values, but doesn't kick in for
attributes like Comment.
>>> c = SimpleCookie()
>>> c['foo'] = u'\N{COPYRIGHT SIGN}'.encode('UTF8')
>>> print str(c)
Set-Cookie: foo="\302\251";
>>> c['foo']['comment'] = u'\N{BIOHAZARD SIGN}'.encode('UTF8')
>>> print str(c)
Set-Cookie: foo="\302\251"; Comment=?;
>>> str(c)
'Set-Cookie: foo="\\302\\251"; Comment=\xe2\x98\xa3;'
>>>
|
|
msg82094 - (view) |
Author: Zan Dobersek (zdobersek) |
Date: 2009-02-14 17:14 |
|
This patch adds an unicode character, converted to UTF8 as a cookie's
comment and then checks if it is correctly quoted.
|
|
msg82418 - (view) |
Author: Zan Dobersek (zdobersek) |
Date: 2009-02-18 14:40 |
|
This patch properly quotes cookie's comment and successfully passes
test_cookie.py with applied patch.
|
|
msg82420 - (view) |
Author: Daniel Diniz (ajaksu2) |
Date: 2009-02-18 15:07 |
|
Thanks, Zan!
All tests pass with both patches applied. Test and fix look correct to me.
|
|
| Date |
User |
Action |
Args |
| 2009-02-18 15:07:02 | ajaksu2 | set | nosy:
+ ajaksu2 messages:
+ msg82420 stage: test needed -> patch review |
| 2009-02-18 14:40:15 | zdobersek | set | files:
+ 991266fix.patch messages:
+ msg82418 |
| 2009-02-14 17:14:14 | zdobersek | set | files:
+ 991266test.patch keywords:
+ patch messages:
+ msg82094 nosy:
+ zdobersek |
| 2009-02-13 21:13:09 | jjlee | set | nosy:
- jjlee |
| 2009-02-13 01:18:53 | ajaksu2 | set | nosy:
+ jjlee stage: test needed type: behavior versions:
+ Python 2.6, - Python 2.3 |
| 2004-07-15 00:17:04 | zenzen | create | |
|