Re: Bugs in http



On Nov 11, 11:12 pm, "tom.rmadilo" <tom.rmad...@xxxxxxxxx> wrote:
On Nov 10, 10:46 pm, "tom.rmadilo" <tom.rmad...@xxxxxxxxx> wrote:

If you need a quick workaround for this, set the -blocksize to -1. If
this gets passed through to [fcopy], it should copy the entire file
(note that internally [fcopy] will yield on every buffer transfer.

Some additional notes for anyone looking further into this issue. I
still haven't found the root cause, but I have narrowed down what is
happening.

First, the two background procs are CopyStart and CopyDone (in
the ::http namespace). CopyStart runs this [fcopy] code:

fcopy $sock $state(-channel) -size $state(-blocksize) -command \
            [list http::CopyDone $token]

Apparently one copy is done, although the number of bytes written is a
little larger than the -size (4096). This seems to be the same when
done with a stand-alone [fcopy] (I adapted the example for copymore
from the [fcopy] manpage).

But the callback command never runs, not even once. Again, in contrast
to the copymore example. So...somehow [fcopy] is screwing up, but just
in the http package.

The only reason for the need for the -blocksize option is that it
allows tracking the progress of the transfer. Assuming this problem
ever gets solved, it might be better to only enable this option if
there is a progress tracking proc (state(-progress)), otherwise set
blocksize to -1, since [fcopy] reschedules itself after every buffer
copy.

Oops, I realize my post about the bugreport I created doesn't show up.
Sorry about that. You can join the investigation there:

https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2895565&group_id=10894

-Alex
.



Relevant Pages

  • Re: Bugs in http
    ... (note that internally [fcopy] will yield on every buffer transfer. ... to the copymore example. ... there is a progress tracking proc ), ...
    (comp.lang.tcl)
  • Re: Bugs in http
    ... (note that internally [fcopy] will yield on every buffer transfer. ... allows tracking the progress of the transfer. ... http package may need a fix as well. ...
    (comp.lang.tcl)
  • Re: Bugs in http
    ... (note that internally [fcopy] will yield on every buffer transfer. ... DrS ...
    (comp.lang.tcl)