Re: Libwww suggestions

Brooks Cutter (bcutter@pdn.paradyne.com)
Thu, 25 Aug 1994 22:07:31 -0400 (EDT)


> Also, if there are any other suggestions that you know of, now would
> be a good time to air them.

I'd like to suggest that in wwwhttp.pl'request, when you set the
alarm timeout, reset it after each read from the socket..

This would change the meaning of the timeout argument from
the total amount of time the request will take to the total
time in between reads from the server.

I know the original design of libwww-perl was towards robot
development, which typically pulled down small html files..
I've encountered problems with this on my browser, when
pulling down rather large gif images - and it aborts not
because of a lack of response, but because it couldn't
transfer the data in the timeout interval..

Of course this won't fix my problem - as you pointed out it
slurps the content into one variable - but I'll take whatever
I can get.. (I don't want to use timeout values of 300secs/5mins)

I've been thinking about what will solve my problem - and I
think the best way to solve it is to have a request-like
routine return the filehandle, and read it in 1k blocks,
resetting the alarm after each read.  I haven't written this
up yet - and I'm not sure of the best way to return the filehandle.

How do you pass a pointer to the filehandle?
You could convert it into integer with $fh=fileno(FH) and the caller
could re-open it with open(FH,">&$fh") ... Eventually I'll want to
plug in a status routine so I can show the user % transferred..

Thought I'd throw that up for comments..

-Brooks
bcutter@paradyne.com