[squeak-dev] MonticelloConfiguration and Installer questions
Bert Freudenberg
bert at freudenbergs.de
Thu Sep 18 18:43:51 UTC 2008
Am 18.09.2008 um 20:14 schrieb C. David Shaffer:
> Bert Freudenberg wrote:
>>
>>
>> Works fine with an http squeaksource server for me.
>>
> Ah, that's it. Apache/WebDAV servers produce:
>
> HTTP/1.1 204 No Content
>
> when a PUT is issued on top of an existing file. This appears to be
> OK, as far as the specification doesn't really indicate what
> successful status code should be used. Anyway, this causes MC to
> produce a walkback even though the PUT was successful. I suggest
> (only last two lines changed):
>
> MCHttpRepository>>writeStreamForFileNamed: aString replace:
> ignoreBoolean do: aBlock
> | stream response statusLine code |
> stream := RWBinaryOrTextStream on: String new.
> aBlock value: stream.
> response := HTTPSocket
> httpPut: stream contents
> to: (self urlForFileNamed: aString)
> user: self user
> passwd: self password.
>
> statusLine := response copyUpTo: Character cr.
> code := (statusLine findTokens: ' ') second asInteger.
> (#(200 201 204) includes: code)
> ifFalse: [self error: response].
>
>
> but I'm not enough of an MC guru to know if this is a bad idea or
> not. If I don't hear any objections I'll post the patch.
Actually, all 2xx codes mean okay:
http://www.w3.org/Protocols/HTTP/HTRESP.html
- Bert -
More information about the Squeak-dev
mailing list
|