Overview
| Artifact ID: | 0165f2b43c6b7b23a61401c96e4f4210f5d1a2c8 |
|---|---|
| Ticket: | 719790ffffffffffffffffffffffffffffffffff
fcopy -command hangs in Win NT4 |
| User & Date: | matben on 2007-12-03 20:10:04 |
Changes
- icomment:
Logged In: YES user_id=108900 Originator: NO Update: The problems with fcopy has now also been seen on MacOSX 10.2 running 8.4.9 and Windows XP running 8.4.13. This happens when I run from "sources" using a normal Tcl/Tk installation. Thus, tclkit is not involved in any way. I reproduce it each time but only when downloading files from Pandions (http://www.pandion.be/) built in HTTP server which is used for file transfers. In short, the last callback from "fcopy ... -command ..." which contain a partly filled buffer never happens. I have tested both the standard http package and my own httpex package, both uses fcopy with the -channel option. They both behave the same. On the other hand, rewritten the httpex package to instead use fileevents as in: # This is a trick to put this event at the back of the queue to # avoid using any 'update'. after idle [list after 0 [list \ [namespace current]::SetReadable $s $token]] } } proc httpex::SetReadable {s token} { # We could have been closed since this event comes async. if {[lsearch [file channels] $s] >= 0} { fileevent $s readable \ [list [namespace current]::Read $s $token] } } works consistently. Also, using Firefox or Safari to obtain the url also works consistently. All this points to some problems with the fcopy command which only reveals itself in some circumstances. How Pandions HTTP server works I hav no idea about but its responses are: httpex::Event state(state)=waiting line=HTTP/1.1 200 OK httpex::Event state(state)=getheader line=Content-Length: 14256 httpex::Event state(state)=getheader line=Content-Type: application/octet-stream httpex::Event state(state)=getheader line=Connection: close httpex::Event state(state)=getheader n=0 - login: "matben"
- mimetype: "text/plain"
- username: "matben"