Problem with repeated

I am trying to write a program that initializes the libwww library and
repeatedly gets pages from the Internet.  However after about 10 iterations
the requests fail.
I added a while loop to w3c-libwww-5.1m/Examples/chunk.c to show this
behaviour.  That program, BTW, calls HTRequest_new() before initializing the
library, which appears wrong but probably harmless.  I am short of time
right now and doubt I will be able to debug this problem, and am hoping for
some advice.

Also, I noticed that running

Robot/.libs/webbot -depth 1 -prefix http http://www.microsoft.com

I get, after a lot of output,

HTTPReq.c:65 Why is this?
Aborted (core dumped)

It doesn't seem like I should be on line 65 to begin with.  Can someone
check these things, to see if I have a bad libwww.a build.  I happen to be
running on a Linux system.

thank you,

Tom Friedel
Ready Ink Incorporated
Custom Internet Software and Web Sites
2500 E. Las Olas Blvd. #804
Fort Lauderdale, FL 33301
http://www.readyink.com
Voice/Fax: 954-523-4182




*** chunk.c~    Wed May 20 21:45:10 1998
--- chunk.c     Thu Aug 13 13:00:01 1998
***************
*** 8,14 ****

  int main (int argc, char ** argv)
  {
!     HTRequest * request = HTRequest_new();
      HTChunk * chunk = NULL;
      char * url = argc==2 ? argv[1] : NULL;

--- 8,14 ----

  int main (int argc, char ** argv)
  {
!     HTRequest * request ;
      HTChunk * chunk = NULL;
      char * url = argc==2 ? argv[1] : NULL;

***************
*** 20,25 ****
--- 20,29 ----
      WWWTRACE = SHOW_CORE_TRACE + SHOW_STREAM_TRACE + SHOW_PROTOCOL_TRACE;
  #endif

+     while ( 1 ) {
+
+     request = HTRequest_new();
+
      /* Set up the request and pass it to the Library */
      HTRequest_setOutputFormat(request, WWW_SOURCE);
      if (url) {
***************
*** 32,38 ****
        /* If chunk != NULL then we have the data */
        if (chunk) {
            char * string = HTChunk_toCString(chunk);
!           printf("%s", string ? string : "no text");
            HT_FREE(string);
        }
      } else {
--- 36,42 ----
        /* If chunk != NULL then we have the data */
        if (chunk) {
            char * string = HTChunk_toCString(chunk);
!           printf("%s", string ? "yes text" : "no text");
            HT_FREE(string);
        }
      } else {
***************
*** 41,46 ****
--- 45,52 ----

      /* Clean up the request */
      HTRequest_delete(request);
+
+     }

      /* Terminate the Library */
      HTProfile_delete();

Received on Thursday, 13 August 1998 21:51:26 UTC