[BUG] positionOfSubCollection: ([closed] on Mantis ID 1411)

Larry Trutter ltrutter at onemain.com
Tue Jul 5 12:49:55 UTC 2005


Thank you for your report.  I have transferred your report to Squeak's
Mantis Database and you can followup on the issue if desired by going to
http://bugs.impara.de/view.php?id=1411

In the future please report new issues on Squeak's Mantis Database at
http://bugs.impara.de/ .

FYI- I also copied information from Michael Rueger's email and added his 
attachment as well.
Thanks!

Larry Trutter

Avi Bryant wrote:

> 'ab' readStream positionOfSubCollection: 'ab' "1  OK"
> 'aab' readStream positionOfSubCollection: 'ab'   "0   WRONG"
>
> What's going on here is that positionOfSubCollection: is apparently  
> being very naive: "is 'aa' = 'ab'?  No.  Ok, is 'b' = 'ab'?  No.  Ok,  
> 'aab' must not have 'ab' then.".  This is likely to cause problems in  
> all kinds of places, but the specific place I ran into it was trying  
> to upload a file ending in a CR to Comanche - it ends up looking for  
> CRLF in CRCRLF with exactly the same results as the 'aab' example above.
>
> Rather than trying to figure out how to fix this method, since it's  
> only used by SocketStream, I thought I'd try out Göran's  
> FastSocketStream instead.  That solved the problem nicely.
>
> Incidentally, the initials on the latest  
> #positionOfSubCollection:ifAbsent: are mine, because of a fix I  
> submitted last December.  I don't think this fix caused the problem  
> above (it was just for an off-by-one error), but I don't have the  
> earlier version handy, so I can't be sure.  I also don't remember who  
> the original author was, but perhaps they have some insight...
>
> I'm posting this to the list rather than just to Mantis to a) warn  
> people that they might want to use FastSocketStream if they're having  
> trouble with HTTP uploads and b) ask, is there any reason we aren't  
> looking at including FastSocketStream as the default SocketStream  
> implementation in the image?  Göran, do you think it's ready, or are  
> there still kinks to work out?
>
> Avi
>




More information about the Squeak-dev mailing list