cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: get error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 24 May 2002 12:14:38 +0200 (MET DST)

On Fri, 24 May 2002, Li Zhao wrote:

> I am using curllib7.9.7 with visualc++6. I let curllib post form data to
> a mail server(www.ziplip.com),

> but when i used codes below to implement what curl has done, i meet
> problem: it just return 0x0D0A0D0A. i don't know why?
>
> int main(void)
> {
> CURL *curl;
> CURLcode res;
> char *i = [URL cut off]
>
> curl = curl_easy_init();
> if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, i);
> curl_easy_setopt(curl, CURLOPT_VERBOSE , TRUE);
>
> res = curl_easy_perform(curl);

Use this one too, it makes the same as -i to the command line client:

      curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);

> and curl.exe dump
> > GET
> /ps/PmApp/zlp_dummy?uc=mckPZX0EACRKU0VQHOVCSSWPYEHMCCRZLYGKTD0RLH0&NextPag
> e=/ZLPlus/ui/html/en/framesMain.jsp HTTP/1.1
> User-Agent: curl/7.9.7 (win32) libcurl 7.9.7 (OpenSSL 0.9.6d)
> Host: www.ziplip.com
> Pragma: no-cache
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
>
> HTTP/1.1 200 OK
> Server: Microsoft-IIS/5.0
> Date: Fri, 24 May 2002 07:53:52 GMT
> Connection: Keep-alive
> Cache-Control: no-cache
> Content-Type: text/html; charset=ISO-8859-1
> Content-Length: 1263
>
> could you tell me why they are diffrent? thank you for your advice.

This second one only outputs some extra headers. You'll get them with your
program too when modified as shown above.

It does seems odd though that this claims "Content-Length: 1263" and no
response-body was returned. Or did you cut it off for the purpose of this
mail?

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Received on 2002-05-24