help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [BUG?] Missing second byte -nextHunk (again)


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [BUG?] Missing second byte -nextHunk (again)
Date: Fri, 09 Mar 2007 14:38:59 +0100
User-agent: Thunderbird 1.5.0.10 (Macintosh/20070221)

> Attached file is simple echo server and I did test with nc(netcat)
> like this;
> 
> echo -e "hello\r\n" | nc localhost 8123
> 
> again, which returns "hllo" instead of correct "hello".

This was caused by the changes to Stream>>#copyFrom:.  It is fixed
as in this patch:

--- orig/tcp/Buffers.st
+++ mod/tcp/Buffers.st

@@ -111,7 +111,7 @@ bufferContents
     "Answer the data that is in the buffer, and empty it."
     | contents |
     self basicAtEnd ifTrue: [ ^self species new: 0 ].
-    contents := self copyFrom: ptr to: endPtr.
+    contents := self collection copyFrom: ptr to: endPtr.
     endPtr := ptr - 1. "Empty the buffer"
     ^contents
 !

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]