http::geturl in starkit/starpack
From: Jos Decoster (decoster_at_raphael.retarget.com)
Date: 02/16/04
- Next message: Ramsunder: "lreplace command inconsistent behaviour"
- Previous message: Geoff Battye: "Re: Invisible variable problem in itcl inheritance"
- Next in thread: Jeff Hobbs: "Re: http::geturl in starkit/starpack"
- Reply: Jeff Hobbs: "Re: http::geturl in starkit/starpack"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Feb 2004 16:11:20 +0100
Hi,
When wrapping the script below into a starkit or a starpack, the http::geturl
command never completes on Windows (tested on Win2K and XP). Downloading small
files works OK. When downloading large files, the scripts hangs after
downloading several kilobytes. I tested using the latest tclkit runtime from
www.equi4.com (Tcl 8.4.5) and http package 2.4.5.
When running the script without wrapping, it works fine. I tested using the
latest ActiveTcl (8.4.5.0).
Any inputs on how I can solve this problem?
Kind regards,
Jos.
##
## Test script:
##
## http::geturl hangs when using as starkit or starpack
##
package require http
if { $::tcl_platform(platform) == "unix" } {
set file /tmp/test.tar.gz
} else {
console show
set file c:/tmp/test.tar.gz
}
# Use your favorite large binary zip file
set url "http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.5-src.tar.gz"
proc progress { download_token total_size current_size} {
puts -nonewline "."
flush stdout
}
proc complete { download_token } {
puts " END"
flush stdout
}
set f [open $file w]
fconfigure $f -encoding binary
set download_token [http::geturl $url -binary true -channel $f \
-progress progress -command complete]
puts "Waiting for download to complete..."
http::wait $download_token
puts "Waiting done!!!!!"
# Check errors if I get here
http::cleanup $download_token
close $f
- Next message: Ramsunder: "lreplace command inconsistent behaviour"
- Previous message: Geoff Battye: "Re: Invisible variable problem in itcl inheritance"
- Next in thread: Jeff Hobbs: "Re: http::geturl in starkit/starpack"
- Reply: Jeff Hobbs: "Re: http::geturl in starkit/starpack"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|