[Checkins] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/app/http/ Conform to RFC2616 for PUT requests by returning a Location-header.

Gary Poster gary at zope.com
Fri Sep 29 08:03:50 EDT 2006


On Sep 29, 2006, at 1:47 AM, Christian Theune wrote:

> Good morning,

Morning!  And apologies if I were too impatient.

...

>
> Gary Poster wrote:
>>
>> On Sep 28, 2006, at 1:51 PM, Marius Gedminas wrote:
>>> Ouch!  This change broke HTTP PUT for an application I'm working on.
>>> [...]

...

> I admit I haven't looked at the interface, but thought this was a
> non-intrusive change that was covered by a unit test. Wrong and bad  
> me.

Well, bad us, I suppose, for the tests being insufficient.   
Whatever.  I suspect you are generally due praise rather than blame;  
this issue ended up being more complex than the tests and interfaces  
revealed, apparently.

> I'll revert the change.
>
> I'll make the IWriteFile-interface a bit more explicit in the same  
> step.
> Maybe the unit test didn't cover it because al lthe data passed in was
> smaller than 2**6 Bytes. Darn.
>
> This teaches me to fix something while going along!

:-) :-/

> An annotation to the interface from my side: this isn't very  
> pythonic in
> the sense of duck-typing. If it's a "file" interface and has a "write"
> method I should be able to derive that it behaves like a Python
> file-like object. :/ The method's name have been better as "update" or
> "set" or whatever, but not write.

That makes sense to me--or that your interpretation of `write` was  
correct and that ZPTPage's usage was wrong.  Practically, though, it  
seems easier and safer from a backwards compatibility perspective to  
do the reversion as you suggest (and as I see you did).

Thanks

Gary


More information about the Zope3-Checkins mailing list