cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Authenticating via https form

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sat, 12 Feb 2005 00:15:55 +0100 (CET)

On Fri, 11 Feb 2005, Mark Eyman wrote:

> curl 7.11.1 (i686-pc-cygwin) libcurl/7.11.1 OpenSSL/0.9.7e zlib/1.2.2

I realize this is the version you get pre-packaged with cygwin, just be aware
that this is getting rather old.

> <form action="uldconfirm.asp" method="post" name = "loginform">
> <input type="text" name="LoginID" size="20">
> <input type="password" name="Pwd" size="20">
> <INPUT TYPE="submit" VALUE="Submit">
> </form>
>
> curl -d "LoginID=xxxxxx&Pwd=yyyyy&=Submit"
> https://www.theurl.com/condev/uld.asp

The submit won't be sent like that, as it has no name. It will only be:

  "LoginID=xxxxxx&Pwd=yyyyy"

but...

> 1. My password contains some special characters: (%!). The "!" in
> particular, made bash to return an error: "bash: !: event not found". I put
> a single quote " ' " in front of the "!".

You must make sure the data you send is url-encoded. Special characters must
be converted to their %HH versions.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-02-12