summary refs log tree commit diff stats
path: root/lib/devel/httpclient.nim
diff options
context:
space:
mode:
authorrumpf_a@web.de <>2010-01-31 01:27:52 +0100
committerrumpf_a@web.de <>2010-01-31 01:27:52 +0100
commit262a47887d2578c2eb0c2196ea3191b6a088209f (patch)
treeb4f83cd65e7f282aaddd08919f9b63439263abd2 /lib/devel/httpclient.nim
parent35afc48154f7f9d5b344dcec3910b6cb91564c19 (diff)
downloadNim-262a47887d2578c2eb0c2196ea3191b6a088209f.tar.gz
progress for httpclient
Diffstat (limited to 'lib/devel/httpclient.nim')
-rwxr-xr-xlib/devel/httpclient.nim19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/devel/httpclient.nim b/lib/devel/httpclient.nim
index ba424d607..fb9359630 100755
--- a/lib/devel/httpclient.nim
+++ b/lib/devel/httpclient.nim
@@ -82,29 +82,10 @@ proc parseBody(data: var string, start: int, s: TSocket,
         setLen(result, L + missing)
         discard s.recv(addr(result[L]), missing)
       
-      #var c: char
-      #discard s.recv(addr(c), sizeof(c))
-      #if c == '\C': discard s.recv(addr(c), sizeof(c))
-      #if c != '\L': httpError("CRLF missing: " & c)
-      
       # next chunk:
       data = s.recv()
       echo data
       i = 0
-      when false:
-        # chunk may be bigger than what we got:
-        while size < chunkSize:
-          data = s.recv()
-          echo "currsize: ", size, " chunksize: ", chunkSize, " dlen ", data.len
-          if size + data.len <= chunkSize:
-            result.add(data)
-            inc(size, data.len)
-          else:
-            i = chunkSize-size
-            var x = copy(data, 0, i-1)
-            result.add(x)
-            inc(size, x.len)
-            #break
       
       # skip trailing CR-LF:
       while data[i] in {'\C', '\L'}: inc(i)