cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: get error

From: Li Zhao <sg_lizhao_at_yahoo.com.sg>
Date: Fri, 24 May 2002 20:41:26 +0800

yea, OK
just by adding user_agent in header.

there'are some urls that i can access using IE but curl.
are there any free tools that can get the header information sent by IE?
thank you

----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
To: "Li Zhao" <sg_lizhao_at_yahoo.com.sg>
Cc: "libcurl Mailing list" <curl-library_at_lists.sourceforge.net>
Sent: Friday, May 24, 2002 6:14 PM
Subject: Re: get error

> 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
>

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_______________________________________________________________

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