[Seaside] Re: error uploading file

Philippe Marschall philippe.marschall at gmail.com
Fri Dec 10 06:20:33 UTC 2010


2010/12/8 Bob Arning <arning at charm.net>:
>
> On 12/8/10 1:00 AM, Philippe Marschall wrote:
>>
>> Somehow #upToAll:bufferSize:do: sends #nextInBuffer: to self with an
>> argument of -19.
>
> This method does not seem happy when the buffer contents are shorter than
> the search string. If you change...
>
>    index = 0 ifTrue: [
>        aBlock value: (self nextInBuffer: (searchedSoFar - sz)) ].
>    ].
>
> to...
>
>    (index = 0 and: [searchedSoFar > sz]) ifTrue: [
>        aBlock value: (self nextInBuffer: (searchedSoFar - sz)) ].
>    ].
>
> it might be happier.
>
> It's also interesting that...
>
>        searchedSoFar:     23
>        insz:     23
>
> when this...
>
>        inNextToWrite:     1411
>        outNextToWrite:     1
>        lastRead:     1368
>
> would argue for 42 rather than 23. Makes me wonder if something caused
> socket stream to read the rest of the data *after* the error occurred.

Good catch, thanks a lot.
http://code.google.com/p/seaside/issues/detail?id=621

Cheers
Philippe


More information about the seaside mailing list