Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl 8.5.16 for Windows cannot download a large file via http 2.7.13 package

Closed / Duplicate211d71365f73288376f2db8535b4f20572197906Created 12 years agoUpdated 12 years ago
Descriptionwiki2014-10-17 14:53:07
I can reproduce this bug with the following simple code.

The size of the sample file is 4,051,200 bytes.

# get_access_log.tcl
package require http
set url "http://yusuke-blog.info/wp-content/uploads/2014/10/access_log_4mb.txt"
set ch [open access_log_4mb.txt w]
http::geturl $url -channel $ch -binary 1
close $ch

(Running in ActiveTcl 8.5.16 or self-compiled version with MinGW)

>tclsh85 get_access_log.tcl
=> error reading "sock548": resource temporarily unavailable
    while executing
"http::geturl $url -channel $ch"
    (file "get_access_log3.tcl" line 4)

The size of the partially downloaded data is about several kilobytes.

This error does not happen in Tcl 8.5.15 and Tcl 8.6.2.

I guess this is not the issue of http package itself but a socket related issue.

(Environment)
Windows 7 Professional SP1 64bit (Japanese)
ActiveTcl 8.5.16 32bit
Tcl/Tk 8.5.16 32bit (Self-compiled with MinGW)

dgpplain2014-10-17 15:06:44
Dup http://core.tcl.tk/tcl/tktview?name=ed29c4da21
Log in (anonymous is fine) to add a comment.