cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: HTTPs POST - always get 500 error code

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Mon, 16 Apr 2007 13:21:14 -0600

At 11:03 -0700 4/16/07, Cheok Yan Cheng wrote:
>Hello all, I try to perform HTTPs POST by using curl
>tool.
>
>The following web site is the one which I am perform
>https://www.osk188.com/login.jsp?continue=%2Fquotes.jsp
>
>When I provide correct username n password, I am able
>to login to the web site with no problem.
>
>Then, I try to login by using curl. I study the HTML
>code, I found out the form is consists of the
>following fields (Please correct me if I were wrong)
>
>txtUserName=
>txtPassword=
>continue=%2Fquotes.jsp
>sessionError=0
>action2=Login
>action=Sign%20Up%20Now
>Submit2=Forget%20Login%20Password
>
>After analysis, I try to invoke curl using the
>following command
>
>curl -e
>https://www.osk188.com/login.jsp?continue=%2Fquotes.jsp
>-d
>"txtUserName=myusername&txtPassword=mypassword&continue=%2Fquotes.jsp&sessionError=0&action2=Login&action=Sign%20Up%20Now&Submit2=Forget%20Login%20Password"
>https://www.osk188.com/dologin.jsp

Watch for a session-id cookie that you may need to return.

Watch for some javascript that gets executed when you poke one of the submit buttons. It might well change the reply items. The quotes.jsp item is worth worrying about.

The LiveHTTPheaders add-in for the Firefox browser helps a lot to see the results of that kind of thing. On a Mac the iCab log file will do the same thing.

-- 
--> From the U S of A, the only socialist country that refuses to admit it. <--
Received on 2007-04-16