Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header value required to be a string #227

Closed
wants to merge 1 commit into from
Closed

Header value required to be a string #227

wants to merge 1 commit into from

Conversation

gvidon
Copy link

@gvidon gvidon commented Oct 22, 2015

start_response requires that headers titles and values are always strings https://github.com/gevent/gevent/blob/master/gevent/pywsgi.py#L740

In other case exception thrown

UnicodeError: ('The value must be a native string', 'Access-Control-Max-Age', 3600)
<Greenlet at 0x10de6e410: _close_when_done(<socket at 0x10e8f0490 fileno=[Errno 9] Bad file d, ('127.0.0.1', 65126))> failed with UnicodeError

```start_response``` requires that headers titles and values are always strings https://github.com/gevent/gevent/blob/master/gevent/pywsgi.py#L740

In other case this code emit exception
```
UnicodeError: ('The value must be a native string', 'Access-Control-Max-Age', 3600)
<Greenlet at 0x10de6e410: _close_when_done(<socket at 0x10e8f0490 fileno=[Errno 9] Bad file d, ('127.0.0.1', 65126))> failed with UnicodeError
```
@gvidon
Copy link
Author

gvidon commented Oct 22, 2015

Already proposed in #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant