Skip to content
Tcl Source Code History Of Ticket 3610253
Login

History Of Ticket 3610253

Artifacts Associated With Ticket 3610253

  1. Ticket change [ff32f673f3] (rid 108714) by kaitzschu on 2013-04-07 20:42:10:

    1. assignee initialized to: "patthoyts"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When retrieving a file from chunked+gzip enabled server (SourceForge project web) I got constantly truncated result. File size was always an exact multiple of 64k bytes and was missing the tail. It seems that http::CopyChunk trusts there can't be more data left on decompression buffer than one /stream get/ can return and does only one round of gets (using /add -finalize/). Attached patch (agains core.tcl.tk version of file) fixed the problem for me, but I'm not quite sure if the encoder chaining (the reason to foreach streams?) has been taken into account correctly.
      
      As a side note, MAX_BUFFER_SIZE has been declared as 65536 but is being referred as "65k" elsewhere in the file http.tcl.
      
    4. foundin initialized to: "current: 8.6.0"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "kaitzschu"
    10. subsystem initialized to: "29. http Package"
    11. title initialized to: "CopyChunk does not drain decompressor(s)"
    12. type initialized to: "Bug"
  2. Ticket change [397a899807] (rid 112396) by kaitzschu on 2013-04-08 03:42:16:

    1. icomment:
      
      
      File Added - 462391: http.CopyChunk.not.draining.everything.diff
      
      
      
    2. login: "kaitzschu"
    3. mimetype: "text/plain"
    4. username: "kaitzschu"
  3. Add attachment "http.CopyChunk.not.draining.everything.diff" [5ff93bead0] (rid 115913) by kaitzschu on 2013-04-08 03:42:16.

  4. Ticket change [783894084b] (rid 89920) by kaitzschu on 2013-04-08 12:01:12:

    1. icomment:
      A comment to my side note: "65k" appears in file tclZlib.c, not in http.tcl.
      
      
    2. login: "kaitzschu"
    3. mimetype: "text/plain"
    4. username: "kaitzschu"
  5. Ticket change [41e2ef2997] (rid 116270) by dkf on 2013-04-08 14:58:58:

    1. icomment:
      I wonder if this is related to 3603553 (which is/will be fixed in 8.6.1)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [53ad754801] (rid 93799) by kaitzschu on 2013-04-09 17:24:06:

    1. icomment:
      Either unrelated or fix does not apply, version 106daecfcabb5f8314f1196ab9e6cb2e25be1b53 (with date 2013-04-08 20:29:44) from core.tcl.tk has the same problem, downloaded file is still missing tail without patching http::CopyChunk.
      
      
    2. login: "kaitzschu"
    3. mimetype: "text/plain"
    4. username: "kaitzschu"
  7. Ticket change [a1a2d829e3] (rid 204125) by kjnash on 2022-09-11 16:36:35:

    1. closer changed to: "nobody"
    2. comment changed to:
      When retrieving a file from chunked+gzip enabled server (SourceForge project web) I got constantly truncated result. File size was always an exact multiple of 64k bytes and was missing the tail. It seems that http::CopyChunk trusts there can't be more data left on decompression buffer than one /stream get/ can return and does only one round of gets (using /add -finalize/). Attached patch (agains core.tcl.tk version of file) fixed the problem for me, but I'm not quite sure if the encoder chaining (the reason to foreach streams?) has been taken into account correctly.
      
      As a side note, MAX_BUFFER_SIZE has been declared as 65536 but is being referred as "65k" elsewhere in the file http.tcl.
      
    3. icomment:
      I could not find a suitable URL that uses chunked encoding and gzip.
      
      However, the test http11-2.1 does exactly what we need, and it was a matter of finding a file size that triggered the bug - this is now test http11-2.1.1.
      
      The patch provided by kaitzschu fixes the bug. This patch is now applied in commit [3cee774ebf] of branch http-bugfixes-2022H2.  However, <b>I have no expertise in the use of channels, and I would appreciate a review of this code.</b>
      
      The ticket reports "File size was always an exact multiple of 64k bytes and was missing the tail."  I have changed the size of the chunks sent by the server tests/httpd11.tcl from 512 bytes to 671 bytes, in the hope that making the size not equal to a power of 2 would improve the tests.  No other test failures were found.
      
    4. login: "kjnash"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. severity changed to: "Minor"
    8. status changed to: "Pending"
  8. Ticket change [eda924bf35] (rid 258140) by serhiy.storchaka on 2026-10-15 11:29:07:

    1. icomment: "Closing: fixed, see above."
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. status changed to: "Closed"
  9. Ticket change [7b31b885c8] (rid 259941) by serhiy.storchaka on 2026-10-22 17:19:26:

    1. closedate changed to: "2461328.9785581483"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"