cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: posting with curl

From: sonali gadekar <sonaligadekar_at_yahoo.co.in>
Date: Thu, 10 May 2007 13:33:55 +0100 (BST)

Hi,
  Thanx a lot for input.
  The problem has been solved using
   
  curl -s -S -L --cookie /tmp/cookies.txt --cookie-jar /tmp/cookies.txt --insecure --data "redirect=https%3A%2F%2Frhn.redhat.com%2Frhn%
  2FYourRhn.do&username=user&password=password&_flowId=legacy-login-flow&_eventId_submit=Log+In" https://www.redhat.com/wapps/sso/rhn/login.html

Dan Fandrich <dan_at_coneharvesters.com> wrote:
  On Wed, May 09, 2007 at 08:49:45AM +0100, sonali gadekar wrote:
> I matched the headers and cookies with browser and they are exactly matching.

"Exactly"? The command-line you give below won't produce exactly the same
headers as a browser would (e.g. User-Agent & Accept will be different).

> And after executing curl the cookies get saved correctly which means that login
> is successful, but when I am trying to log in to another page using same
> cookies.. its failing.
>
> How can I make sure that cookies are valid or where I am going wrong.

Please be more specific. Is the new page on the same or a different host?
What command line are you using?

> Daniel Stenberg wrote:
>
> On Tue, 8 May 2007, sonali gadekar wrote:
>
> > curl --cookie cookies --cookie-jar cookies --location
> > https://rhn.redhat.com/rhn/YourRhn.do --data
> > "username=user&password=password&_flowId=legacy-login-flow&
> _eventId_submit=Log+In"
> > https://www.redhat.com/wapps/sso/rhn/login.html
>
> --location doesn't take any extra arguments. This command line thus
> features
> two URLs to which curl will POST to, and I doubt you intended that.
>
> --trace-ascii and LiveHTTPHeaders are two good tools to use as well.

>>> Dan

-- 
http://www.MoveAnnouncer.com The web change of address service
Let webmasters know that your web site has moved
       
---------------------------------
 Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Here's a solution! 
Received on 2007-05-10