[squeak-dev] Re: Flaw in SocketStream>>peek detected
Göran Krampe
goran at krampe.se
Thu Jan 14 09:23:28 UTC 2010
Hi all!
I presume this bug is also in Pharo so I CCed.
Andreas Raab wrote:
> Igor Stasenko wrote:
>> The fix is:
>>
>> --- ^inBuffer at: lastRead
>> +++ ^inBuffer at: lastRead+1
>>
>>
>> but i'm not sure if something else won't break because of it ;)
>
> Extremely unlikely. It's pretty clear that peek is wrong here as
> illustrated by:
>
> stream := SocketStream openConnectionToHostNamed: 'www.google.com' port:
> 80.
> stream nextPutAll:('GET / HTTP/1.0\\' copyReplaceAll: '\'with: String
> crlf).
> stream flush.
> stream peek.
>
> This blows up and clearly it shouldn't.
Yup, just fix it! :) Sorry for the bug guys.
regards, Göran
More information about the Squeak-dev
mailing list
|