Re: changes to the http package
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: changes to the http package

From: Andrés García <fandom@spamme.telefonica.net>
Date: Mon Mar 20 2006 - 20:42:09 CET

Salvatore Sanfilippo wrote:

Hi,

> What I want to add is a "config -maxlength <bytes>" option that
> will close the connection, set the status to "truncated", and
> return the first <bytes> bytes of the body.

It may be possible to get what you want using the 'blocksize'
and 'progress'.

With 'blocksize' you indicate the numbers of bytes that will
be received before invoking the callback set with 'progress'.

In that callback you can use http::reset to stop the transfer.

I don't know if it will work, but it is worth a try.

Andres
Received on Sun Apr 30 02:42:09 2006