From: Pat Thoyts Date: Thu, 11 Oct 2007 20:14:50 +0000 (+0000) Subject: Fix -validate to return as soon as we finish reading headers (can't rely on close... X-Git-Tag: vfs-1-4~35 X-Git-Url: http://privyetmir.co.uk/gitweb?a=commitdiff_plain;h=8af32eb517810b18e0a43b43834c6ae19a6407ca;p=tclvfs Fix -validate to return as soon as we finish reading headers (can't rely on close anymore) --- diff --git a/http2.6/http.tcl b/http2.6/http.tcl index b57cf33..8d25a7e 100644 --- a/http2.6/http.tcl +++ b/http2.6/http.tcl @@ -979,6 +979,12 @@ proc http::Event {s token} { variable encodings set state(state) body + # If doing a HEAD, then we won't get any body + if {$state(-validate)} { + Eof $token + return + } + # For non-chunked transfer we may have no body -- in this case we may get # no further file event if the connection doesn't close and no more data # is sent. We can tell and must finish up now - not later.