Feature #1455

patch for mod_usertrack to use of expires versus max-age

Added by MitchLewandowski 420 days ago. Updated 91 days ago.

Status:New Start:
Priority:Normal Due date:
Assigned to:jan % Done:

0%

Category:mod_usertrack
Target version:1.4.21
Pending:

No

Resolution:


Description

My company has had a need recently to issue cookies with a decently sized max-age (1 year). With the value for max-age being a unsigned short in mod_usertrack, and being issued in seconds, we couldn't use a value that large (would exceed the boundries of a unsigned short).

At first, we made a patch to mod_usertrack for that value to be an unsigned long, so we could set a value that large. The problem was that it seemed that only Firefox was RFC compliant, or at least it was the only one honoring max-age as a non-temporary cookie.

Looking at how Google was setting cookies, they were setting the expires header versus max-age. We created a new patch to issue expires, and also setting the value for max-age to months, versus seconds.

From our config:


# the max-age value is set in months
usertrack.cookie-max-age = 12

The patch is attached, if you feel it acceptable, we'd love to have it integrated into the main source.

lighttpd-usertrack-expires.patch (1.3 KB) MitchLewandowski, 11/14/2007 09:04 PM

History

11/14/2007 09:07 PM - MitchLewandowski

Obviously you wouldn't need the commented versions of what we replaced (forgot we didn't remove those after we got it to work).

10/08/2008 07:02 PM - stbuehler

  • Target version changed from 1.4.20 to 1.4.21

Also available in: Atom PDF