cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Easy "POST" question but cannot figure it out!!

From: <jon_at_linertia.com>
Date: Wed, 14 Nov 2007 18:09:46 -0800 (PST)

I'm still looking at this problem and it may be that I have boiled it down
to the "+" sign that may be causing problems in the Log+in

POST /forum/login/ email=email%40email.com&password=pass&login=Log+in

I searched the archives for this and some bug showed up about Zones but I
don't think that has anything to do with it. Anybody ever use this "+"
sign as part of the data in curl?

> Thanks Daniel,
>
> I got the output from LiveHTTPHeaders and it was this:
>
> GET /forum/login/
> POST /forum/login/ email=email%40email.com&password=pass&login=Log+in
>
> that's exactly what I'm sending it as the data in my curl command line.
>
> curl -c cookie -d "email=email%40email.com&password=pass&login=Log+in"
> http://www.example.com/forum/login
>
> What I put above does not work. HOWEVER, I took the cookie information
> from my manual login (which i did through firefox) and copied that
> information into "cookie" and when I logged in, it worked. What's the
> deal here? Obviously I'm not giving it the credentials it wants via curl.
> Is it possible that a server prevents curl requests?
>
> Thanks again!
>
>
>> On Wed, 14 Nov 2007, jon_at_linertia.com wrote:
>>
>>> I have read that already, twice over. It is obvious that I read it
>>> based on
>>> the methods I have used to fix the problem. Any suggestions?
>>
>> Yes, Use LiveHTTPHeaders, clear your cookies then run your operation
>> manually
>> once and log everything with LiveHTTPHeaders.
>>
>> Then inspect the log and repeat those requests with curl. Pay attention
>> to
>> cookies and the exact data sent in the POST.
>>
>> --
>> Commercial curl and libcurl Technical Support:
>> http://haxx.se/curl.html
>>
>
>
>
Received on 2007-11-15