[Seaside] Seaside-REST, PUT, and the Server adaptors

Philippe Marschall philippe.marschall at gmail.com
Mon Apr 18 05:19:59 UTC 2011


2011/4/17 Tobias Pape <Das.Linux at gmx.de>:
>
> Am 2011-04-17 um 20:01 schrieb Philippe Marschall:
>
>> 2011/4/15 Tobias Pape <Das.Linux at gmx.de>:
>>>
>>> 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>
>>> (http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.seaside/24213)
>>>
>>> The fix is in:
>>> http://code.google.com/p/glassdb/issues/detail?id=261
>>>
>>>> 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:
>>>>
>>>> change
>>>> #readFrom: aStream
>>>> to
>>>> #for: aRequestLine readFrom: aStream
>>>>
>>>> and do the same for the super call.
>>>
>>> That is:
>>>
>>> HTTPPut
>>> -readFrom: aStream
>>> +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].
>>>        ^self
>>
>> Ah, you're on GemStone, that explains why I couldn't observe this.
>> Thanks for debugging and reporting.
>
> Stop, I saw this on all
> Seaside.app (ie, Pharo),
> Squeak4.2, and
> GemStone

Does this happen if you load:
Swazoo-2.3beta2.2

Cheers
Philippe


More information about the seaside mailing list