Ticket #778 (defect)
Opened 5 months ago
Last modified 4 months ago
CherryPy 2.3.0 breaks on Python2.3
Status: closed (fixed)
| Reported by: | guest | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | CherryPy code | Keywords: | |
| Cc: |
CherryPy 2.3 and Python2.3 make CherryPy crash when trying to parse the headers with this traceback:
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/CherryPy-2.3.0-py2.3.egg/cherrypy/_cpwsgiserver.py", line 235, in run
request.parse_request()
File "/usr/lib/python2.3/site-packages/CherryPy-2.3.0-py2.3.egg/cherrypy/_cpwsgi.py", line 169, in parse_request
_cpwsgiserver.HTTPRequest.parse_request(self)
File "/usr/lib/python2.3/site-packages/CherryPy-2.3.0-py2.3.egg/cherrypy/_cpwsgiserver.py", line 151, in parse_request
for k in headers:
File "/usr/lib/python2.3/rfc822.py", line 390, in __getitem__
return self.dict[name.lower()]
AttributeError: 'int' object has no attribute 'lower'
Changing line 150 of _cpwsgiserver.py from for k in headers: to for k in headers.keys(): seems to resolve the problem.
Change History
01/27/08 19:37:55: Modified by fumanchu
- status changed from new to closed.
- resolution set to fixed.
- description changed.
- summary changed from CherryPy 2.3.0 breaks on Python2.3 behind apache2+mod_proxy to CherryPy 2.3.0 breaks on Python2.3.
03/13/08 10:43:36: Modified by cito@online.de
Thanks for fixing this. The reason why this breaks in Python 2.3 is Python Bug #1030125. By the way, you should also consider replacing mimetools with email, since mimetools is deprecated since Python 2.3.


Fixed in [1877] on the 2.x branch.