[squeak-dev] MonticelloConfiguration and Installer questions
C. David Shaffer
cdshaffer at acm.org
Thu Sep 18 18:14:05 UTC 2008
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.
David
More information about the Squeak-dev
mailing list
|