W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: Doing multiple requests with libwww.

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Sat, 17 Jul 1999 07:39:07 -0400
Message-Id: <>
To: Gertjan van Wingerde <gertjan.van.wingerde@cmg.nl>, www-lib@w3.org
At 09:22 15/07/1999 +0200, Gertjan van Wingerde wrote:
>With the attached program I am trying to download two web pages using a GET
>As can be seen from the program, after the HTTP response is received I am
>the error code, response HTTP headers, and the web page itself from the
>object associated with the request.
>However, when I execute the program the first URL is received ok, but during
>fetching of the second URL no error code can be deduced, and no HTTP headers
>found. The web page itself includes the HTTP status line, and the HTTP
>header lines.

Maybe the reason is that you delete all the global converters in between
the two requests. Around line 255, you have something like this:

    ** Deallocate allocated resources.

    HTFormat_deleteAll();			<--- delete this

		<--- delete this line

Btw, when using blocking sockets (which only works for requests without an
entity body (like GET, HEAD, and OPTIONS) you shouldn't have to initialize
the event loop. Event loops are only for when you are using non-blocking
sockets. You can check that it is never called in your application.

Henrik Frystyk Nielsen,
World Wide Web Consortium
Received on Saturday, 17 July 1999 08:15:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:51 UTC