cURL / Mailing Lists / curl-users / Single Mail

curl-users

log in with authentication problem

From: Guirong Wang <guirong2004_at_yahoo.com>
Date: Mon, 16 Apr 2007 13:46:03 -0700 (PDT)

Hi, all
I am trying to log into a web page with the corect user name and password using the following command (on Linux):
  curl -o temp.html -d "user=username&password=\$password*\$"
https://secure.site.com
  but failed with the following message in the temp.html file:
 
This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.<P>
 
When I tried the following command:
 curl -o temp.html -v -d "user=username&password=\$password*\$"
https://secure.site.com
  I got the following message:
  * About to connect() to secure.site.com port 443
* Trying xx.xx.xx.xx... * connected
* Connected to secure.site.com (xx.xx.xx.xx) port 443
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
  CApath: none
* SSL connection using AES256-SHA
* Server certificate:
* subject: /C=US/ST=Statename/L=cityname/O=BLUE CROSS BLUE SHIELD OF state
/OU=DTS/OU=Terms of use at www.verisign.com/rpa (c)05/CN=SECCOMM.BCBSNE.COM
* start date: 2006-01-24 00:00:00 GMT
* expire date: 2009-01-30 23:59:59 GMT
* common name: SECURE.STE.COM (matched)
* issuer: /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign Interna
tional Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.
(c)97 VeriSign
* SSL certificate verify ok.
> POST / HTTP/1.1
User-Agent: curl/7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zl
ib/1.2.1.2 libidn/0.5.6
Host: secure.site.com
Pragma: no-cache
Accept: */*
Content-Length: 30
Content-Type: application/x-www-form-urlencoded
  user=username&password=$password*$< HTTP/1.1 401 Authorization Required
< Date: Mon, 16 Apr 2007 20:09:19 GMT
< Server: SecureTransport/4.6
< WWW-Authenticate: Basic realm="FileDriveWWW"
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 397 0 397 0 0 425 0 --:--:-- --:--:-- --:--:-- 0
* Connection #0 to host secure.site.com left intact
* Closing connection #0
  I still don't understand where the problem is. Can anybody give me some clue?
  Thank you very much in advance.
  Karen

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
Received on 2007-04-16