You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from __future__ import unicode_literals
...
response.headers['Cache-Control'] = 'max-age=0'
...
Results in:
Traceback (most recent call last):
File "bottle.py", line 1134, in wsgi
start_response(response._wsgi_status_line(), response.headerlist, exc_info)
File "/usr/lib/python2.7/wsgiref/handlers.py", line 179, in start_response
assert type(name) is StringType,"Header names must be strings"
AssertionError: Header names must be strings
This is similar to issue #923, including the fix, but applies to the header key, as opposed to the value.
The simple fix previously used for header value:
def _hval(value):
+ value = tonat(value)
...
could also be used for the header key:
def _hkey(key):
+ key = tonat(key)
...
The text was updated successfully, but these errors were encountered:
Example:
Results in:
This is similar to issue #923, including the fix, but applies to the header key, as opposed to the value.
The simple fix previously used for header value:
could also be used for the header key:
The text was updated successfully, but these errors were encountered: