Strange values in Accept-Language header?
Michael Ströder
michael at stroeder.com
Tue Sep 24 12:53:50 EDT 2002
Alan Kennedy wrote:
> Accept-Language: x-ns16W5tM7A2Nh6,x-ns2U210btwUq5f
> Accept-Language: en-us,x-ns1jZKcD2t3NhQ,x-ns2r3509OnmPe2
For what it's worth:
Python 2.2.1 (#2, May 4 2002, 19:50:26)
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.decodestring('ns16W5tM7A2Nh6')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/base64.py", line 44, in decodestring
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
>>> base64.decodestring('16W5tM7A2Nh6')
'\xd7\xa5\xb9\xb4\xce\xc0\xd8\xd8z'
>>> base64.decodestring('s16W5tM7A2Nh6')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/base64.py", line 44, in decodestring
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
>>> base64.decodestring('16W5tM7A2Nh6')
'\xd7\xa5\xb9\xb4\xce\xc0\xd8\xd8z'
>>> base64.decodestring('2U210btwUq5f')
'\xd9M\xb5\xd1\xbbpR\xae_'
>>>
...
Ciao, Michael.
More information about the Python-list
mailing list