Re: [squeak-dev] Re: Flaw in SocketStream>>peek detected

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Flaw in SocketStream>>peek detected

Göran Krampe
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


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Flaw in SocketStream>>peek detected

Göran Krampe
Göran Krampe wrote:
> Hi all!
>
> I presume this bug is also in Pharo so I CCed.

Sorry, never mind, Igor already cross posted...

regards, Göran


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project