cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: COOKIES EXPIRES AFTER CERTAIN TIME

From: Alessandro Vesely <vesely_at_tana.it>
Date: Tue, 03 Jul 2007 20:16:12 +0200

Sidd,
the problem with top posting is that mail messages become very long as
every message is duplicated in its entirety. Furthermore, when the next
message writer responds to a specific question in the previous message,
he or she has to provide a full English sentence, such as "Yeah its true
I login through browser grab the cookie through httpliveheader and use
it into the code" where a much more concise "Yes" right below the quoted
relevant sentence would have sufficed. That makes messages even longer.
In addition, in order to reconstruct what a given thread is about one has
to skim through the whole length *in reverse order*. Also, you don't need
to repeat the same answer for each message. By carefully selecting what
parts of a message are still relevant, after configuring your client for
quoting the original message like most people do on most lists, you'd be
able to send short messages that crisply and precisely express a question.
The likelihood to get the correct answer would increase dramatically.

Daniel is much more acknowledgeable than I about curl. If you ask him
questions concisely and politely, you may get the most useful answers.
Complicate questions may require more interactions to get solved. Make
sure you understood exactly what a reply said, before responding to it.

Curl is capable of following redirections and storing cookies. Check the
manual for the three options I mentioned, and merge them into a new command
line and see what happens. If you can solve the problem yourself reading
the manual and experimenting, a quick note about the solution might help
other users. If the manual is not enough, Google is your friend searching
the huge archives in haxx.se. If you get stuck and cannot proceed, then ask
further questions. Try to diagnose the problem correctly. Even if English
does not support you much, try to use correct terms. Make sure you know
what curl's option results in what behavior. If in doubt, copy and paste
portions of your command window, but remove passwords and sensible data
before sending.

Good luck!

-------- Original Message --------
Subject: RE: COOKIES EXPIRES AFTER CERTAIN TIME
Date: Tue, 3 Jul 2007 12:34:29 -0400
From: siddharth <sidd_at_americanmicrosemi.com>
Reply-To: the curl tool <curl-users_at_cool.haxx.se>
To: 'the curl tool' <curl-users_at_cool.haxx.se>

Yeah its true I login through browser grab the cookie through httpliveheader
and use it into the code.

I was thinking to automate this process that curl would relogin and grab the
cookie and then download the files

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Alessandro Vesely
Sent: Tuesday, July 03, 2007 6:00 AM
To: the curl tool
Subject: Re: COOKIES EXPIRES AFTER CERTAIN TIME

Daniel Stenberg wrote:
> On Mon, 2 Jul 2007, siddharth wrote:
>
>> Thanks for your quick reply. I mean to say that I am able to download
>> the files but after sometimes the cookies expires and I am using the
>> --trace-ascii option where it is showing 0% in all the columns means
>> the cookies get expire after a certain time and I need to relogin
>> because of which the --trace-ascii options show's me zero in all the
>> columns.
>
> Top-posting makes it very hard to follow this discussion. What were we
> talking about again?
>
> Cookies expire at the set time, I don't understand how that is a curl
> problem?

If I remember Siddarth's post correctly, he logs in using his browser
rather than curl, and the cookies he gets have a limited duration.

Perhaps, it is not easy to find an example on how to get cookies with
curl and then use them in the next connection, i.e. how to combine
options -b/--cookie <filename>, -c/--cookie-jar <filename>, and possibly
-L/--location.
Received on 2007-07-03