[Prev][Next][Index][Thread]
HTLoadToChunk problem
-
To: "'www-lib-bugs@w3.org'" <www-lib-bugs@w3.org>
-
Subject: HTLoadToChunk problem
-
From: Scott Abbott <SAbbott@TechDev.CompuServe.com>
-
Date: Fri, 12 Sep 1997 16:21:01 -0400
-
From www-lib-bugs-request@www10.w3.org Fri Sep 12 16: 25:29 1997
-
Message-ID: <c=US%a=_%p=CompuServe%l=TECHDEVA-970912202101Z-13000@techdeva.inhouse.compuserve.com>
-
X-Authentication-Warning: www10.w3.org: Host techdev.inhouse.compuserve.com [149.174.22.50] claimed to be techdeva.inhouse.compuserve.com
-
X-List-URL: http://www.w3.org/pub/WWW/Archives/Public/www-lib-bugs/
-
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
I'm having trouble using HTLoadToChunk - hopefully I'm simply using it
incorrectly. For some reason when I call HTLoadToChunk to retrieve a
data file (for example a GIF) it wants to dump the data to a file
rather than to the chunk.
The following test program shows that the returned chunk exists but
chunk->data does not. Along the way, it prompts for a filename and
successfully saves the GIF to a file. I want the GIF to be kept in the
memory chunk. Am I doing something wrong?
#include "WWWLib.h"
#include "WWWInit.h"
#include "WWWApp.h"
int main (int argc, char **argv)
{
HTProfile_newPreemptiveClient ("Test", "1.0");
{
HTRequest * req = HTRequest_new ();
HTChunk * chunk = HTLoadToChunk
("http://home.netscape.com/images/noscript_banner.gif", req);
if (chunk)
{
printf ("Chunk exists\n");
if (chunk->data)
printf ("Data exists\n");
}
}
return (0);
}
This problem occurs on both NT 4.0 and BSDi 1.1 compiles of libwww.
Any URL gives the same behavior.
Scott Abbott
sabbott@techdev.compuserve.com
614-723-6216