[Zope-dev] Request input on bug about HTTP response.setStatus

Roger Ineichen dev at projekt01.ch
Wed Jan 28 23:06:50 EST 2009


Hi all
  
> Betreff: [Zope-dev] Request input on bug about HTTP response.setStatus
> 
> Hi all.  There's some disagreement about how to resolve the 
> bug below, even though there's agreement that we want it 
> resolved.  Your input would be appreciated so we can find a 
> consensus and move forward with a solution.
> 
> https://bugs.edge.launchpad.net/zope3/+bug/322486

As far as I can see, we all agree that we need to be able to use
new response status. And the question is, should we be able
to use them ad hoc or do we need to declare them first.

In programming language normaly you can just use things. But a 
framework like a server must be configured first befor you can
use new things.

I think it's a question if the response setStatus is a kind 
of the server as a framework or if this is just another python
method.

As far as I can tell, I personaly like to use setStatus(209)
and I whould be surprised if something other then 209 get
returned as 209 by getStatus() (as shane told).

another solution could be to introduce an additional argument.
(seatbelt)
e.g.

def setStatus(status, force=False):
  if force:
    # don't fallback to status 500
  else:
    # fallback to 500 if given status doesn't exist

Anyway, 
Python is a bike and java is a car. Because why? Java has
built in seatbelts and airbags and Python is light and fast.

Regards
Roger Ineichen



More information about the Zope-Dev mailing list