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

Fix #289 - Website should work with wsgiref #319

Merged
merged 1 commit into from Apr 1, 2014
Merged

Conversation

pjz
Copy link
Contributor

@pjz pjz commented Apr 1, 2014

We were read()ing when there were no bytes expected,
which meant we blocked when we shouldn't have.

We were read()ing when there were no bytes expected,
which meant we blocked when we shouldn't have.
@@ -631,7 +631,8 @@ def __init__(self, headers, fp, server_software):

"""
typecheck(headers, Headers, server_software, str)
self.raw = self._read_raw(server_software, fp) # XXX lazy!
raw_len = int(headers.get('Content-length', '') or '0')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just headers.get('Content-length', 0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it has to be typecasted to int(), and '' needs to be turned into '0'.

chadwhitacre added a commit that referenced this pull request Apr 1, 2014
Fix #289 - Website should work with wsgiref
@chadwhitacre chadwhitacre merged commit d14d9aa into master Apr 1, 2014
@chadwhitacre chadwhitacre deleted the issue289 branch April 1, 2014 14:21
Changaco pushed a commit that referenced this pull request Mar 11, 2016
Fix #289 - Website should work with wsgiref
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

2 participants