Re: tclkit string size limit?

Pat Thoyts <[email protected]> Thu, 22 Jul 2010 22:53:53 +0100
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
On 22 July 2010 21:36, jemptymethod <[email protected]> wrote:
> Is there some sort of limit on the size of strings when using tclkit?
> I ask because I am able to use the Tcl-based browser hv3 just fine to
> render an html page that uses the script tag and src attribute to
> utilize a Javascript file that is around 70k in size.
>
> That is, until I wrap hv3 as a starkit, and then the page won't
> render. =A0But when I break that Javascript file into 3 files, then the
> browser is able to render the page just fine, depending on the size of
> the files.
>
> Below are the 3 files that hv3 wrapped in a starkit can handle:
>
> -rwx------ =A01 George None 27693 Jul 22 16:17 jsPgnViewer_converter.js
> -rwx------ =A01 George None 30284 Jul 22 07:04 jsPgnViewer_rest.js
> -rwx------ =A01 George None =A09311 Jul 22 16:17
> jsPgnViewer_thruFuncStripItBroken.js
>
> If I re-arrange the contents of those files though, hv3 in the context
> of a starkit sometimes fails. =A0Below I am posting the file sizes for
> an instance when the browser fails to render the page. My theory is
> that it's because one of them is over 32K in size. =A0Thanks in advance
> for any insight into what could be causing my issue, regardless of
> whether it fits in with my current assumptions/hypothesis
>
> -rwx------ =A01 George None 33741 Jul 22 16:07 jsPgnViewer_converter.js
> -rwx------ =A01 George None 30284 Jul 22 07:04 jsPgnViewer_rest.js
> -rwx------ =A01 George None =A03263 Jul 22 16:06
> jsPgnViewer_thruFuncStripItBroken.js
>
There is nothing intrinsic in the tclkit code that would limit string
size. Its just a tcl interpreter with some vfs wrapping. However, more
likely is that it is either a difference in the versions of the http
package or the presence of zlib in the tclkit and this may affect the
downloading of the files.
We need to know the versions of everthing here. But if you fire up
tclkit and try
  set tok [http::geturl $url]
and then
 upvar $tok token
 set token(body) ""
 parray token
you can dump out the metadata for the request and response. It might
be you are hitting some kind of transport-encoding issue in the http
fetch or a decoding zlib compressed data issue or something.

Another thing to try might be to add -protocol 1.0 to your geturl
command if the problem is http related.

Pat Thoyts

--=20
You received this message because you are subscribed to the "starkit" group=
.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to starkit-unsubscribe@googlegro=
ups.com
For more options, visit this group at http://groups.google.com/group/starki=
t?hl=3Den