Re: Tcl/Tk 8.5.2 Release Candidates



Hello,

While running tests with eTcl builds with this RC, and/or running htmlviewer3, found a problem which is not really a bug, but a serious incompatibility related to new http 2.7 packages merged into 8.5 branch, and more exactly to chunk transfer support.

When a -handler argument is defined, chunk processing is not done, so returned data has "<size>\n" chunk headers leaked in, together with a terminating "0\n" segment. It means any current code whuch calls geturl with a -handler argument (e.g. hv3, but also probably most code caring about reporting progress during non-blocking http transfer) will get corrupted answer. In new http.tcl:1029, one can find:

if {[info exists state(-handler)]} {
set n [eval $state(-handler) [list $sock $token]]
} elseif {[info exists state(transfer_final)]} {
....
} elseif {[info exists state(transfer)]
&& $state(transfer) eq "chunked"} {
....


Also, while having a look at this new http implementation, I noticed that in the chunk handling code, socket is temporaly switched back to blocking mode when reading chunk length header

fconfigure $sock -blocking 1
set chunk [read $sock $size]
fconfigure $sock -blocking $bl

which seems to me quite hazardous, since this might freeze a whole application in a Event callback one may assume to be non-blocking. So I'm wondering if, while support for chunk transfer and deflate encoding is a nice addon, this major step forward in this (pure Tcl) http package is really stabilized and compatible enough to be introduced during a minor version update (8.5.1->8.5.2)? Wouldn't be more safe to leave it as an option for those needing those features, or or provide it side by side with previous implementation?

Eric

PS: shall I report this in SF bug report as well, or, since RC has been announced in c.l.t, is this report enough ?

Donald G Porter wrote :

Tcl/Tk 8.5.2 RC 2 now available in

ftp://ftp.tcl.tk/pub/tcl/tcl8_5/

Authors of code that calls the Ttk_* C routines are especially
encouraged to test this release. Significant changes and efforts have
been made to correct interface failures. Please confirm that the
current attempt works for you.



-----
Eric Hassold
Evolane - http://www.evolane.com/
.



Relevant Pages

  • Re: Please participate in the Ubuntu Popularity Contest !
    ... I have the same problem with popularity-contest sending via HTTP: ... unable to submit report to ... how to correct this bug - I'm beginner... ...
    (Ubuntu)
  • Re: Formuli in query
    ... between call volume in one chunk of time compared to another chunk in ... This time chunk is defined by a form gleaned from the Northwind ... My present query is as such for call total comparison report ... subreport1 and subreport2 totals. ...
    (microsoft.public.access.queries)
  • RE: Invalid free space report in IDS 7.31.FD8 on Solaris 9
    ... informix$ onstat -d ... When I look in onmonitor's report on corresponding dbspace, ... Chunk Chunk Pages Pages Full Pathname of Chunk ...
    (comp.databases.informix)
  • Formuli in query
    ... Currently I am trying to sum rows in a report to show the difference ... between call volume in one chunk of time compared to another chunk in ... subreport1 and subreport2 totals. ...
    (microsoft.public.access.queries)
  • Re: question about fread function
    ... may accidentally read the next few bytes., Probably this may the bug ... haunting your code. ... then sizeof() operator wont give you the correct size of the chunk you ...
    (comp.lang.c)