- From: Colin Hirsch <hirsch-w3lib@mystic.informatik.rwth-aachen.de>
- Date: Fri, 25 Aug 2000 15:38:28 +0200
- To: www-lib@w3.org
Hi There, a few days ago I started to patch together a download utility a la wget using libwww, however there is one point where I am having problems. (If this is not the right forum for such a question please send all flames/redirects to my private address to not further bother the list.) What I want to do as first step is load an html file and write it to disk and send it through the html parser at the same time. However it seems that the outputstream in the HTRequest class is not actually used? My plan was to send the stream from the request through a Tee object so that one of the streams can go to the parser and the other copy to disk. Problem is, I haven't even figured out how to correctly attach an HTFWriter to the request via HTRequest_setOutputStream, i.e. I never actually got the file written to disk when isssuing the HTLoad(). (And no, I don't want to use HTLoadToFile() which seems to work, but doesn't give as much control over what happens to the data.) I also tried fiddling around with the converters, but that seems to be totally independent of the outputstream -- as long as I have something like HTFormat_addConversion("text/html", "www/present", HTMLPresent, 1.0, 0.0, 0.0); the html parser is called (even thouth I haven't registered any callbacks there). ... Building.... C-T stack from text/html to www/present StreamStack. Constructing stream stack for text/html to www/present Building.... Content-Decoding stack Building.... Transfer-Decoding stack Host........ passing 286 bytes as consumed to 0x8050e50 Host........ 2617 bytes remaining Start <HTML> Start <HEAD> Start <TITLE> End </TITLE> End </HEAD> Start <BODY> ... Trying to guess from the name what it does (am I too stupid to find the thing explained in the docs?) I also tried the following: HTFormat_addConversion("image/gif", "www/present", HTSaveConverter, 1.0, 0.0, 0.0);... which results in a successful load if I give the url of a gif file, however nothing happens to the data loaded... I tried to find an answer to this poorly-defined question in the docs, but haven't found anything enlightning so far... Any help would be greatly appreciated. Thanks, Colin -- Dipl.-Inform. Colin Hirsch hirsch@informatik.rwth-aachen.de Research Group on Mathematical Foundations of Computer Science University of Technology Aachen Germany --
Received on Friday, 25 August 2000 09:38:32 UTC