HTLoadToChunk

I am trying to test the latest CVS sources under NT. My code does an
HTLoadToChunk to read a file from the network.

     chunk = HTLoadToChunk(url, request);
     if (chunk)
     {
          // Wait for libwww request to complete.
          err = LibWWWWait(request);
          if (err == 0)
          {
               // Get data address and length.
               chunkBuffer = HTChunkData(chunk);
               chunkLen =  HTChunkSize(chunk);

               // Process the chunk.
               err = ProcessChunk(chunkBuffer, chunkLen);
          }
     }

The LibWWWWait routine starts the HTEventLoop and waits for an after filter
to stop it, at which point, it returns. The problem is with the semantics
of HTLoadToChunk(). The file being loaded contains something like the
following:

     ; This is a comment

     This is a line of text to be processed

Notice that there is a blank line after the comment line. With libwww 5.2,
the chunk encompassed the entire body, that is, HTChunkSize() returned the
size of the entire body. But with the latest CVS sources, HTLoadToChunk()
only returns the first line, that is, HTChunkSize() returns the length of
the first line of the file, not the length of the entire file. This used to
work. Can anyone enlighten me as to where I could look to fix this? This is
a bug, yes?

regards,
-jim

Received on Tuesday, 6 April 1999 11:51:47 UTC