cURL / Mailing Lists / curl-library / Single Mail

curl-library

(null) output from WriteMemoryCallback function

From: Mark Warburton <curl_at_instruform.com>
Date: Tue, 18 May 2004 20:56:37 +1200

When I modify the example file getinmemory.c at the
end of main and add:
printf("%s\n",chunk.memory);

and compile it using:
cc -o getinmemory getinmemory.c -l curl
it runs perfectly and prints out the web page.

BUT, when I change the url in the source file from
http://cool.haxx.se/
to something horrible like:
http://v3.espacenet.com/results?
sf=n&FIRST=1&F=0&CY=ep&LG=en&DB=EPODOC&PN=Us3
000000&Submit=SEARCH&=&=&=&=&=

and recompile it outputs: (null)
after downloading the web page

Running: curl "http://v3.espacenet.com/results?
sf=n&FIRST=1&F=0&CY=ep&LG=en&DB=EPODOC&PN=Us3
000000&Submit=SEARCH&=&=&=&=&="
outputs the web page (i.e. non-null)

Anyone have any ideas on what is going on?

My curl -V:
curl 7.11.2 (i686-pc-linux-gnu) libcurl/7.11.2
OpenSSL/0.9.7a zlib/1.1.4
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: SSL libz NTLM Largefile

I have confirmed the same behaviour under curl 7.10.3
as well.

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
Received on 2004-05-18