Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #588 (defect)

Opened 2 years ago

Last modified 2 years ago

CherryPy incorrect output for 1xx, 204, 304

Status: closed (fixed)

Reported by: pjenvey@groovie.org Assigned to: rdelon
Priority: high Milestone: 3.0
Component: CherryPy code Keywords:
Cc:

CherryPyWSGIServer will close a potential Keep-Alive connection ('Connection: close' header) when responses lack a Content-Length value. This is correct behavior most of the time, except for 204 No Content and more importantly 304 Not Modified response codes.

As per RFC 2616: these responses must not contain a response body, and thus lack a Content-Length header. Browsers/clients do not require the Content-Length header for these responses during Keep-Alive as they are "always terminated by the first empty line after the header fields".

Meaning the server should maintain a Keep-Alive connection (when appropriate) for these two respone codes.

Patch attached

Attachments

_cpwsgiserver.py_r1405_ticket588.diff (0.9 kB) - added by pjenvey@groovie.org on 10/21/06 20:01:41.
allow Keep-Alive with 204 & 304 codes

Change History

10/21/06 20:01:41: Modified by pjenvey@groovie.org

  • attachment _cpwsgiserver.py_r1405_ticket588.diff added.

allow Keep-Alive with 204 & 304 codes

10/21/06 22:39:10: Modified by fumanchu

  • status changed from new to closed.
  • resolution set to fixed.
  • summary changed from CherryPyWSGIServer sends Connection: close during 204 & 304 responses (patch attached) to CherryPy incorrect output for 1xx, 204, 304.

Fixed in [1406]. Thanks! I went ahead and fixed 1xx responses, too, in the app server as well as the HTTP server.

Hosted by WebFaction

Log in as guest/cpguest to create tickets