On Tuesday 25 October 2005 12:16, Stephan Richter wrote:
> On Tuesday 25 October 2005 09:18, Michael Kerrin wrote:
> >   There is some code in zope.app.http.put module that I would like to
> > remove since the code in question seems a bit extreme in my opinion, and
> > its breaking the twisted integration.
> >
> >   In the default PUT handler we have the following:
> >
> >        for name in request:
> >             if name.startswith('HTTP_CONTENT_'):
> >                  # Unimplemented content header
> >                  request.response.setStatus(501)
> >                  return ''
> >
> >   Low and behold Twisted actually sets the HTTP_CONTENT_LENGTH variable
> > in the request and hence we always get a 501 response for a PUT request.
> >
> >   I can't see the logic to failing a request like this, so is alright for
> > me to remove this code.
>
> If there is no unit test explaining the reason for this condition, please
> feel free to remove it. It is very important for SchoolTool that PUT works.
>
> Please add a test explaining why we not want this. :-)this.
There is a test in zope.app.http.put.tests.test_put to make sure that this 
behavior is followed but it doesn't explain why you want to do this.

So I can remove the code and modify the test to make sure things go through 
with a HTTP_CONTENT_ header.

Michael

-- 
Michael Kerrin

55 Fitzwilliam Square,
Dublin 2.

Tel: 353 (0) 87 688 3894
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to