1

Let's say my apache config contains the following

CookieTracking on
CookieName userfault
CookieDomain userfault.com

LogFormat "%{userfault}C" userfaultlog
CustomLog /var/log/userfault.com/access.log userfaultlog

I see that the log then contains lines with IP.somenumber, e.g.

257.15.13.478.1200074655803685
619.203.17.113.1200174880115935

I'd like to know the specifications for this number, more specifically how it can be stored in the most efficient way. I looked around and could only find the default CookieStyle is 'Netscape', but that didn't get me much further.

Can I safely assume it will fit in a 64bit number? Is it even a number (and decimal at that)?

Pieter
  • 1,409
  • 3
  • 12
  • 9

1 Answers1

1

The document for the Netscape Cookie Spec is here: http://web.archive.org/web/20080205173011/http://wp.netscape.com/newsref/std/cookie_spec.html . What you're logging is the content of the cookie. For example in my site I have:

W.X.Y.Z.1251144662259653
Origin=testing

I think the number is a timestamp or expire date.

UPDATE

In the source code of mod_usertrack, you can find how the cookie ID is generated. The comments say:

Make Cookie: Now we have to generate something that is going to be pretty unique. We can base it on the pid, time, hostip

So the number we see is a unique ID for tracking the cookie.

hdanniel
  • 4,293
  • 23
  • 25
  • I think it's some sort of timestamp too, but I'd like to know the exact format, the link you provided is helpfull, but doesn't touch that either... – Pieter Aug 25 '09 at 10:09
  • Got it. I've updated my answer. – hdanniel Aug 25 '09 at 19:28
  • thanks alot, somehow didn't occur to me to dig in the source code...for anyone else: the number trailing the IP is generated by apr_time_now(), which returns a 64 bit timestamp (microseconds since epoch) – Pieter Sep 01 '09 at 13:52