Artifacts Associated With Ticket 2b1eaecfae
Ticket change [51a60eadb4] (rid 133266) by JKU on 2013-08-13 13:59:00:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
The http library may call http::Eof twice under certain circumstances, which leads to a "data error" on the second try to remove the encoding. <verbatim> % package require http 2.8.5 % proc putargs args {puts $args} % trace add execution ::http::Eof enter putargs % http::geturl http://johannes13.de:36895/hgolf.tcl {Eof ::http::44} enter {Eof ::http::44} enter data error </verbatim> One possible way is if the server * sends the header "Connection: keep-alive" * sends the header "Content-Encoding: gzip" * closes the connection after the request. Example webserver (I wrote it for code-golf and modified it a bit to match the requirements above): <verbatim> socket -server a 36895 proc a s\ args { set h 200\ OK;set c "\nConnection: keep-alive\nContent-Encoding: gzip\nContent-Type: ";set g 0 expr {[regexp {GET (\S*)} [gets $s] - 1]?[file isd [set f /home/$1]]?0:[file exi $f]?[set g 1;file ext $f]in{.txt .html}?[append h $c[dict get {.txt text/plain .html text/html} [file ext $f]]]:[append h ${c}application/octet-stream]:[set h 404\ Not\ Found]:[set h 405\ Not\ Supported]} puts $s HTTP/1.1\ $h if $g {flush $s; set h [open $f];set cnt [zlib gzip [read $h]]; puts $s "Content-Length: [string le $cnt]\n" flush $s fconfigure $s -translation binary; puts -nonewline $s $cnt close $h} close $s} </verbatim> - foundin initialized to: "Tcl 8.6.0 http 2.8.5"
- is_private initialized to: "0"
- login: "JKU"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "JKU"
- subsystem initialized to: "29. http Package"
- title initialized to: "http fails under certain circumstances"
- type initialized to: "Bug"
Ticket change [2f6858f1f5] (rid 162356) by kjnash on 2018-04-13 14:03:07:
- closedate changed to: "2458222.08550521"
- closer changed to: "kjnash"
- icomment:
I have verified that this was a bug in http 2.7.10. The attempt to decode content-encoding twice no longer occurs in 2.8.12, and was probably fixed long before that. I'm going to close the bug.
- login: "kjnash"
- mimetype: "text/plain"
- status changed to: "Closed"