curl-users
Re: 7.10.4 not working with SSL
Date: Thu, 10 Apr 2003 14:56:04 +0200 (CEST)
On Thu, 10 Apr 2003, Webmaster SGH wrote:
> When I do POSt like this:
> curl -d "a=alfa&b=beta" https://username:password@secure.server.com
>
> I get response:
> "Server certificate does not match those at 'secure.server.com'"
>
> I tried to install with or with/out SSL, but no help. So i simply
> DOWNGRADED from CURL 7.10.4 to CURL 7.10.1 and it works fine.
Is that response a direct quote of an actual error message from curl? I
searched the sources and I can't find any such error string. What return code
did you get from the curl command?
> Now, with CURL 7.10.1 I have problems, when I try to fetch only return
> ERROR CODE from a POST request:
> curl -d "a=alfa&b=beta" https://username:password@secure.server.com
>
> If I add parameter
> -w%{http_code}
>
> I DO get error code back, BUT WITH THE WHOLE PAGE!!!
Sorry, but the http code is not an error code in curl's sense. It is the code
the HTTP returned, but it also returned contents. You get both.
> If I use parameter -I
>
> I get RID of WHOLE PAGE, but I get RID of ERROR CODE, too!
Well, you then change the request to a HEAD so it may act differently.
> How can I retreive only ERROR CODE from the response, but without
> displaying the whole page?
curl [options] [URL] -o /dev/null
I guess -f might work too.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.comReceived on 2003-04-10