Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-16
23:13 • Ticket [218601ffff] ::http::CopyDone try to eof a closed channel and don't c... artifact: 3c157a270b user: dgp
23:13 • Ticket [218601ffff]: 1 change artifact: 157dca0903 user: dgp
2000-10-26
08:25 • Deleted ticket [218601ffff]. artifact: 8aa81370bf user: welch
01:02 • New ticket [218601ffff]. artifact: 998a538a67 user: nobody

::http::CopyDone try to eof a closed channel and don't catch

Deleted218601ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:02:58
OriginalBugID: 1406 Bug
Version: 8.0.4
SubmitDate: '1999-03-02'
LastModified: '1999-11-03'
Severity: SER
Status: Released
Submitter: pat
ChangedBy: hobbs
OS: Linux
OSVersion: slackware 3.5, kernel 2.0.36, runtime libs for glibc2
Machine: Other
FixedDate: '1999-11-03'
FixedInVersion: 8.2.2
ClosedDate: '2000-10-25'


Name:Luc Deschenaux

ReproducibleScript:
#I'm not sure I'm using 8.0.3... maybe 8.0.4...
#The error occurs after a ::http::reset during a 
#catch {::http::geturl http://localhost/file -channel $fileChan -progress #http_progress -timeout 30000 -headers {Pragma no-cache}}
#http_progress is calling update.
#::http::reset is called from the button -command option of the progress dialog #"Abort" button.
global token
set w .progress
toplevel $w
set b [button $w.button#1 -command {::http::reset $token}]
pack $b
set f [open $name w]
if {![catch {::http::geturl http://localhost/file -channel $f -timeout 30000 -headers {Pragma no-cache} -progress http_progress}]} {}
close $f
catch {destroy $w}

proc http_progress {tok total cur} {
    global token
    set token $tok
    update
}

ObservedBehavior:
I can't catch the error.. it occurs when the user abort a http transfer
(I saw it testing auto-update in my application... that sucks..)
(I need to catch all errors to be able to do batch transfers without user interaction)

STACK TRACE_______________________________________________

can not find channel named "sock5"
    while executing
"::eof $s"
    (procedure "http::CopyDone" line 11)
    invoked from within
"http::CopyDone ::http::4 8192"

DesiredBehavior:
I expect you replace "::eof $s" with "catch {::eof $s}" within procedure http::CopyDone, line 11 but... :) I should be able to doit... I've got the source.. :) ok I install the latest version so that I'm sure I've got 8.0.4 and if package http is not byte compiled and not fixed I change it and I post the patch here.. 



The necessary catches are in http2.1 of Tcl8.2.2. 
-- 11/03/1999 hobbs
welch Deleted ticket [218601ffff]. [History diff]2000-10-26 08:25:10
dgp Ticket [218601ffff]: 1 change [History diff]2001-04-16 23:13:04
dgp Ticket [218601ffff]: 2 changes [History diff]2001-04-16 23:13:05
Log in (anonymous is fine) to add a comment.