cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Https connect (user+password)

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 8 May 2003 10:23:33 -0700

On Thu, May 08, 2003 at 09:24:46AM +0200, Daniel Stenberg wrote:
> On Thu, 8 May 2003, Naved Khan wrote:
> > Can we test the connection to the server in any other way using libcurl
> > than trying to get a page?
>
> This system does not "test the connection to the server". It does a lot more,
> it tests if you can get a web page off the server.
>
> But no, you can't know if you can get a page without trying to get the page!

There are several other tests that you could do but all of them fall short
of testing whether you can get a page off the server:

 - resolve the DNS of the host
 - check that the HTTPS socket is accepting connections
 - perform an SSL handshake
 - check the SSL certificate received during the handshake
 - check that there is an HTTP server listening at the other end

But if you want to check that the username/password is correct, you
have to download a page. In fact, since the server could theoretically
be configured to fail all requests except for the one page that will
eventually be requested, you have to download that page to see if it
will work.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Received on 2003-05-08