diff options
author | kjnash <k.j.nash@usa.net> | 2022-09-11 16:32:30 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2022-09-11 16:32:30 (GMT) |
commit | e681ade127e237c8ebf20bbaf02f6c5757671b71 (patch) | |
tree | 05241f1daceb328a12bea3d21ea0fc87cb358089 /library/http | |
parent | b34f06a4afa5f57846efbe55f8dccb29e4611e2b (diff) | |
download | tcl-e681ade127e237c8ebf20bbaf02f6c5757671b71.zip tcl-e681ade127e237c8ebf20bbaf02f6c5757671b71.tar.gz tcl-e681ade127e237c8ebf20bbaf02f6c5757671b71.tar.bz2 |
Fix bug [3610253] - apply the patch supplied with the ticket, and add a test. REVIEW REQUESTED! Also fix -zip 0 so it sends "Accept-Encoding: identity".
Diffstat (limited to 'library/http')
-rw-r--r-- | library/http/http.tcl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 691355c..551b323 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -2129,6 +2129,9 @@ proc http::Connected {token proto phost srvurl} { && $http(-zip) } { puts $sock "Accept-Encoding: gzip,deflate" + } elseif {!$accept_encoding_seen} { + puts $sock "Accept-Encoding: identity" + } else { } if {$isQueryChannel && ($state(querylength) == 0)} { # Try to determine size of data in channel. If we cannot seek, the @@ -4064,7 +4067,12 @@ proc http::CopyChunk {token chunk} { if {[info exists state(zlib)]} { set excess "" foreach stream $state(zlib) { - catch {set excess [$stream add -finalize $excess]} + catch { + $stream put -finalize $excess + set excess "" + set overflood "" + while {[set overflood [$stream get]] ne ""} { append excess $overflood } + } } puts -nonewline $state(-channel) $excess foreach stream $state(zlib) { $stream close } |