cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: (null) output from WriteMemoryCallback function

From: Mark Warburton <curl_at_instruform.com>
Date: Wed, 19 May 2004 20:26:33 +1200

On Wed, 19 May 2004, Mark Warburton wrote:

> > < Content-Length: 0
>Can you guess what this header means? ;-)

Yes, the content length of the apparent reply is zero. However, appended is
the output from the SAME URL using:
curl -v "http://v3.espacenet.com//results?
sf=n&FIRST=1&F=0&CY=ep&LG=en&DB=EPODOC&PN=Us3000000&Submit=SEARCH
&=&=&=&=&="

The results are very different. The command line version behaves as I expect
it should from downloading the url in a web browser. libcurl, on the other
hand, behaves DIFFERENTLY.

Can anyone explain the discrepancy between libcurl and curl? More
particularly, are the parsers used in parsing the command line for curl
different from those that parse strings passed to libcurl? If so, should the
string version be amended in any way for it to work in libcurl in the same way
as in command-line curl?

Regards
Mark

* About to connect() to v3.espacenet.com port 80
* Connected to v3.espacenet.com (145.64.132.192) port 80
> GET /results?
sf=n&FIRST=1&F=0&CY=ep&LG=en&DB=EPODOC&PN=Us3000000&Submit=SEARCH
&=&=&=&=&= HTTP/1.1
User-Agent: curl/7.11.2 (i686-pc-linux-gnu) libcurl/7.11.2 OpenSSL/0.9.7a
zlib/1
.1.4
Host: v3.espacenet.com
Pragma: no-cache
Accept: */*

  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0<
HTTP/1.1 200 OK
< Date: Wed, 19 May 2004 08:12:33 GMT
< Server: IBM_HTTP_SERVER/1.3.19.6 Apache/1.3.20 (Unix)
< Set-Cookie: JSESSIONID=0000KKWW0GDZ4SOS030AJCDYJAA:vbn2u3c5;Path=/
< Cache-Control: no-cache="set-cookie,set-cookie2"
< Expires: Thu, 01 Dec 1994 16:00:00 GMT
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=iso-8859-1
< Content-Language: en

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>
        esp_at_cenet results view
    </title>
<STYLE media="print">
... (rest of the page) ...
   </body>
</html>

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