- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Sat, 17 Jul 1999 07:39:07 -0400
- To: Gertjan van Wingerde <gertjan.van.wingerde@cmg.nl>, www-lib@w3.org
At 09:22 15/07/1999 +0200, Gertjan van Wingerde wrote:
>Hi,
>
>With the attached program I am trying to download two web pages using a GET
>method.
>As can be seen from the program, after the HTTP response is received I am
>fetching
>the error code, response HTTP headers, and the web page itself from the
>Anchor
>object associated with the request.
>
>However, when I execute the program the first URL is received ok, but during
>the
>fetching of the second URL no error code can be deduced, and no HTTP headers
>are
>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.
*/
HTRequest_delete(pr_request);
HTFormat_deleteAll(); <--- delete this
line
HT_FREE(pc_cwd);
HT_FREE(pc_absolute_url);
HTMIMEInit();
<--- 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
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk
Received on Saturday, 17 July 1999 08:15:33 UTC