1. cherrypy
  2. CherryPy
Issue #43 resolved

cpg.request should include protocol version

Anonymous created an issue

It would be helpful for my application if cpg.request would provide a way to access the protocol version (as a number, not a string) that the client used to request the page. For instance, I want to send HTTP 1.0 clients a 302 response code instead of 303 or 307, but currently there isn't a way to find out which it is.

Reported by eurleif@ecritters.biz

Comments (8)

  1. Anonymous

    I would prefer a string with HTTP/<version> so we can support other protocols as well. And i don't think having a float for the version is very nice ;) But for determining the version request and chaning it's behaviour, using the string ought to be enough.

  2. Anonymous

    Do you wish to save the entire line in the headerMap? It is an option, but having the protocol number available directly would be usefull as well. .

  3. anonymous

    I vote for the whole line, letting each app parse it if need be. To me, this is inline with keeping CherryPy a high-density, low volume framework.

  4. Log in to comment