Skip to content

Commit

Permalink
[gevent worker] Fix broken header parsing in logging (benoitc#1607)
Browse files Browse the repository at this point in the history
We have a http.client.HTTPMessage in Python 3
(mimetools.Message in Python 2), just take .items()
from that.
  • Loading branch information
mattbillenstein authored and berkerpeksag committed Oct 23, 2017
1 parent 595ca26 commit 5d4f885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gunicorn/workers/ggevent.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def log_request(self):
resp_headers = getattr(self, 'response_headers', {})
resp = GeventResponse(self.status, resp_headers, self.response_length)
if hasattr(self, 'headers'):
req_headers = [h.split(":", 1) for h in self.headers.headers]
req_headers = self.headers.items()
else:
req_headers = []
self.server.log.access(resp, req_headers, self.environ, response_time)
Expand Down

0 comments on commit 5d4f885

Please sign in to comment.