Brian Sutherland
2011-10-11 c3c0bea60cbb543a75fd4f18334a8d99def65d15
refs
author Brian Sutherland <brian@vanguardistas.net>
Tuesday, October 11, 2011 11:14 +0200
committer Brian Sutherland <brian@vanguardistas.net>
Tuesday, October 11, 2011 11:14 +0200
commitc3c0bea60cbb543a75fd4f18334a8d99def65d15
tree 4b75e3c8ebdd7f7fb7c577975035932a76278ba5 tree | zip | gz
parent a8b272f130e92847538a5145e7fd119228854510 view | diff
Convert unicode tokens to 'str'

This was resulting in unicode cookie values (and thus headers) on
Python 2 causing mod_wsgi to complain:
TypeError: expected string object for header value

PEP 3333 also says:
"Native" strings (which are always implemented using the type named
str) that are used for request/response headers and metadata

So mod_wsgi is right to complain about unicode headers and Pyramid is
wrong to send them.
2 files modified
11 ■■■■ changed files
pyramid/authentication.py 5 ●●●● diff | view | raw | blame | history
pyramid/tests/test_authentication.py 6 ●●●●● diff | view | raw | blame | history