[Seaside] Seaside-REST, PUT, and the Server adaptors
Das.Linux at gmx.de
Fri Apr 15 10:56:51 UTC 2011
Am 2011-04-15 um 12:13 schrieb Tobias Pape:
>>> put was done using:
>>> curl -v -X PUT -T Seaside-GemStone-REST-Core-topa.2.mcz http://localhost:8888/rest/
>> Thanks, I'll try that. Can you tell me which version of Swazoo you use?
> the one that is installed with the 3.0.4 Seaside Version when requesting 'Seaside-Adaptors-Swazoo'
> I'll have a look at some code I and some guys wrote two
> years ago, I think we already 'fixed' that
Ok, I just forgot my own Email to this list:
<03209795-18BF-41DF-864F-470DC8895949 at gmx.de>
The fix is in:
> HTTPPut implements #readFrom: wich is never sent.
> However, it should implement #for:readFrom: in order
> to set its field as done in #readFrom:.
> To make a long story short:
> #readFrom: aStream
> #for: aRequestLine readFrom: aStream
> and do the same for the super call.
+for: aRequestLine readFrom: aStream
| contentTypeField |
- super readFrom: aStream.
+ super for: aRequestLine readFrom: aStream.
contentTypeField := self headers fieldOfClass: ContentTypeField
ifNone: [SwazooHTTPPutError raiseSignal: 'Missing Content-Type'].
contentTypeField mediaType = 'application/octet-stream'
ifTrue: [self octetDataFrom: aStream]
ifFalse: [self urlencodedDataFrom: aStream].
More information about the seaside