[Seaside-dev] WAResponse >> #contents

Paolo Bonzini bonzini at gnu.org
Wed Feb 20 17:39:09 UTC 2008


Lukas Renggli wrote:
>> This method does a reset before returning the stream.  I suppose it is
>>  because you want to use #next on the stream or something similar?  But
>>  I'm not sure that's the cause, because the stream is a WriteStream, not
>>  a ReadStream...
> 
> I agree, that's odd. I don't see a reason to do that in there.
> 
> When sending #contents I would expect to get a string anyway, not a stream.

The Swazoo adapter in fact does "response contents contents"...  But 
actually I can see why #contents returns a stream: in the future you 
would like to be able to do just "aSocket nextPutAll: aResponse 
contents" and avoid useless contents.  So it is desirable that #contents 
returns a Stream.

Paolo


More information about the seaside-dev mailing list