Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 51d4794280a7bb2bd3fea021ffb968a6b83d096e
Ticket: 2762041fffffffffffffffffffffffffffffffff
Fix (too) early recognition of EOF in a channel stack
User & Date: patthoyts on 2009-06-26 05:59:29
Changes

  1. icomment:
    It is definately some interaction with the 'zlib push' and the fcopy we use in the http package when the -channel option has been provided. The only tests that fail use both -channel and a compression algorithm which leads to a 'zlib push'. Test http11-2.9 is the same as 2.[678] but doesn't use any compression (hence does not 'zlib push' and it never fails.
    
    Recognizing this I've added some puts commands into http::CopyDone and arranged to retry when we see an [eof]. On [eof] I set a flag in the state array and try one more time. This causes the tests to pass now and in the following output we can see that 2.7 had an early [eof] then continued. I suspect that given more data we might see additional [eof] later so a single retry is probably not robust.
    
    The channel termination can't be due to the data being sent - first, -eofchar is {} here and secondly the three failing tests use different compression algorithms so the data stream will be different in each case.
    
    Tests began at Thu Jun 25 22:03:25 BST 2009
    http11.test
    == CopyDone: count:8192 total: 8192 err:''
    == Eof '1'
    == Retry on Eof
    == CopyDone: count:8192 total: 16384 err:''
    == CopyDone: count:8192 total: 24576 err:''
    == CopyDone: count:8192 total: 32768 err:''
    == CopyDone: count:8192 total: 40960 err:''
    == CopyDone: count:8192 total: 49152 err:''
    == CopyDone: count:8192 total: 57344 err:''
    == CopyDone: count:8192 total: 65536 err:''
    == CopyDone: count:8192 total: 73728 err:''
    == CopyDone: count:8192 total: 81920 err:''
    == CopyDone: count:8192 total: 90112 err:''
    == CopyDone: count:8192 total: 98304 err:''
    == CopyDone: count:8192 total: 106496 err:''
    == CopyDone: count:8192 total: 114688 err:''
    == CopyDone: count:8192 total: 122880 err:''
    == CopyDone: count:7157 total: 130037 err:''
    == Eof '1'
    ++++ http11-2.7 PASSED
    == CopyDone: count:8192 total: 8192 err:''
    == CopyDone: count:8192 total: 16384 err:''
    == CopyDone: count:8192 total: 24576 err:''
    == CopyDone: count:8192 total: 32768 err:''
    == CopyDone: count:8192 total: 40960 err:''
    == CopyDone: count:8192 total: 49152 err:''
    == CopyDone: count:8192 total: 57344 err:''
    == CopyDone: count:8192 total: 65536 err:''
    == CopyDone: count:8192 total: 73728 err:''
    == CopyDone: count:8192 total: 81920 err:''
    == CopyDone: count:8192 total: 90112 err:''
    == CopyDone: count:8192 total: 98304 err:''
    == CopyDone: count:8192 total: 106496 err:''
    == CopyDone: count:8192 total: 114688 err:''
    == CopyDone: count:8192 total: 122880 err:''
    == CopyDone: count:7157 total: 130037 err:''
    == Eof '1'
    == Retry on Eof
    == CopyDone: count:0 total: 130037 err:''
    == Eof '1'
    ++++ http11-2.9 PASSED
    
    
  2. login: "patthoyts"
  3. mimetype: "text/plain"
  4. username: "patthoyts"