Nicolas, I started merging your patch for saving session cookies and
need some advice.  The patch adds two options:

[EMAIL PROTECTED] --keep-all-cookies=on/off
+When set to on, non permanent cookies (session specific cookies) are saved and
+loaded as normal cookies.  This feature is usefull on some site requiring that
+you visit the home page before visiting another page in the same session.
+
[EMAIL PROTECTED] --cookies-never-expire=on/off
+When set, expired cookies are not deleted.

First, I'd like the two options to have consistent names, for example
`--keep-session-cookies' and `--keep-expired-cookies'.

But then I noticed that your implementation of the second option
doesn't merely "not delete" expired cookies, as the documentation
states.  It completely turns off expiry checks, so that stale cookies
are sent to the server.  I'm not sure if you intended this or if it's
a side effect of the implementation strategy you chose.

Should we have an option that allows sending stale cookies to the
server?  Is that kind of thing ever desirable?  I'm of a mind that it
shouldn't be allowed because it directly contradicts HTTP and the
explicit wish of the server in question.  (An option to keep such
cookies is fine, though, because you might want to hold on to the data
in the cookie for whatever reasons.)

Also, it would be really nice if we could avoid adding a bunch of new
options, at least without a very good reason.  Maybe we could replace
the above two with one option that tunes the "keeping" behavior,
e.g. `--keep-cookies=permanent' (default) or
`--keep-cookies=permanent,session,expired' (equivalent to specifying
"permanent", "session", and "expired" in succession).  But maybe that
would only complexify the interface, I'm not sure.

Any thoughts on this?

Reply via email to