cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl-users Digest, Vol 27, Issue 20

From: Naiem Shaik <naiem.shaik_at_gmail.com>
Date: Thu, 22 Nov 2007 17:01:24 +0530

On Nov 22, 2007 4:30 PM, <curl-users-request_at_cool.haxx.se> wrote:
> Send curl-users mailing list submissions to
> curl-users_at_cool.haxx.se
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> or, via email, send a message with subject or body 'help' to
> curl-users-request_at_cool.haxx.se
>
> You can reach the person managing the list at
> curl-users-owner_at_cool.haxx.se
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of curl-users digest..."
>
>
> Today's Topics:
>
> 1. Re: [PATH] --data-urlencode (Alessandro Vesely)
> 2. Problem in opening mail.google.com (Naiem Shaik)
> 3. Re: Problem in opening mail.google.com (Alessandro Vesely)
> 4. Re: [PATH] --data-urlencode (Daniel Stenberg)
> ------------------------------
>
> Message: 2
> Date: Thu, 22 Nov 2007 11:25:48 +0530
> From: "Naiem Shaik" <naiem.shaik_at_gmail.com>
> Subject: Problem in opening mail.google.com
> To: curl-users_at_cool.haxx.se
> Message-ID:
> <92ffbd8f0711212155h6464946fy10710be0f4e95482_at_mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi All,
> Greetings !!
>
> I am working on WebKit, when I tried opening http://mail.google.com,
> CURL gave 2 error messages for 2 tries:
> "Failed connect to www.google.com:443; Success"
> "Failed connect to www.google.com:443; Operation now in progress"
>
> Then I tried launching the page from command line
> curl http://mail.google.com/mail -x $http_proxy ,
> This is the response
> <HTML>
> <HEAD>
> <TITLE>Moved Temporarily</TITLE>
> </HEAD>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> <H1>Moved Temporarily</H1>
> The document has moved <A
> HREF="https://www.google.com/accounts/ServiceLogin?service=mail&amp;passive=true&amp;rm=false&amp;continue=http%3A%2F%2Fmail.google.com%2Fmail%3Fui%3Dhtml%26zy%3Dl&amp;ltmpl=default&amp;ltmplcache=2">here</A>.
> </BODY>
> </HTML>
>
> So I tried opening the link pointed by HREF and once i got a
> segmentation fault and again i got page opened.
>
> Can somebody please let me know what I need to get this properly
> working and what is error 443.
>
> Best Regards,
> Naiem
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 22 Nov 2007 09:03:48 +0100
> From: Alessandro Vesely <vesely_at_tana.it>
> Subject: Re: Problem in opening mail.google.com
> To: the curl tool <curl-users_at_cool.haxx.se>
> Message-ID: <474537E4.9000709_at_tana.it>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Naiem Shaik wrote:
> > I am working on WebKit,
>
> That implies Mac OS X Panther or better?
>
> > when I tried opening http://mail.google.com,
> > CURL gave 2 error messages for 2 tries:
> > "Failed connect to www.google.com:443; Success"
> > "Failed connect to www.google.com:443; Operation now in progress"
> >
> > Then I tried launching the page from command line
> > curl http://mail.google.com/mail -x $http_proxy ,
> > This is the response
> > <HTML>
> > <HEAD>
> > <TITLE>Moved Temporarily</TITLE>
> > </HEAD>
> > <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > <H1>Moved Temporarily</H1>
> > The document has moved <A
> > HREF="https://www.google.com/accounts/ServiceLogin?service=mail&amp;passive=true&amp;rm=false&amp;continue=http%3A%2F%2Fmail.google.com%2Fmail%3Fui%3Dhtml%26zy%3Dl&amp;ltmpl=default&amp;ltmplcache=2">here</A>.
> > </BODY>
> > </HTML>
>
> Probably you had a redirection code (3XX), and the url repeated in
> the headers as well, so that if following redirections were enabled
> curl could follow automatically. See options mentioned at
> http://curl.haxx.se/docs/manpage.html#-L--location
>
> Note that &amp; is the HTML encoding for plain & and you should have
> replaced that.
>
> > So I tried opening the link pointed by HREF and once i got a
> > segmentation fault and again i got page opened.
>
> That is possibly a bug. If you can reproduce it with the last version
> of curl, please send the backtrace obtained from the dumped core file.
>
> > Can somebody please let me know what I need to get this properly
> > working and what is error 443.
>
> That's not an error code, it is the default https port number.
>
>
> ------------------------------
>

Hi Vesely,
I am working on Linux, Gtk port of Webkit.
I have used -L option and was able to open mail.google.com from command prompt.
But in code there is still no progress,
Can you please help me.

 I have set the following options as well

    char path[]="/etc/nss_db";
    curl_easy_setopt(d->m_handle, CURLOPT_SSL_VERIFYPEER,2);
    curl_easy_setopt(d->m_handle, CURLOPT_SSL_VERIFYHOST,2);
    curl_easy_setopt(d->m_handle, CURLOPT_CAINFO,path);
I have set the Curl in verbose mode and got the following output.

< HTTP/1.1 302 Moved Temporarily
< Cache-control: no-cache, no-store
< Pragma: no-cache
< Location: https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&ltmpl=default&ltmplcache=2
< Content-Type: text/html; charset=UTF-8
< Server: GFE/1.3
< Date: Thu, 22 Nov 2007 11:19:43 GMT
< Transfer-encoding: chunked
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
* Replaced cookie GMAIL_HELP="EXPIRED" for domain mail.google.com,
path /, expire 631152000
< Set-Cookie: GMAIL_HELP=EXPIRED;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
* Replaced cookie GV="EXPIRED" for domain mail.google.com, path /,
expire 631152000
< Set-Cookie: GV=EXPIRED;Domain=mail.google.com;Path=/;Expires=Mon,
01-Jan-1990 00:00:00 GMT
* Replaced cookie GV="EXPIRED" for domain mail.google.com, path /mail,
expire 631152000
< Set-Cookie: GV=EXPIRED;Domain=mail.google.com;Path=/mail;Expires=Mon,
01-Jan-1990 00:00:00 GMT
There is error in httpCode = 302
<
* Ignoring the response-body
* Expire cleared
* Connection #3 left intact
* Issue another request to this URL:
'https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&ltmpl=default&ltmplcache=2'
* About to connect() to www.google.com port 443 (#4)
* Trying 64.233.189.104... * Connection refused
* Failed connect to www.google.com:443; Operation now in progress
* Expire cleared
* Closing connection #4
Received on 2007-11-22