You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Clinton Gormley <cl...@traveljury.com> on 2007/12/19 20:09:22 UTC

Cookie errors

Hi all

I'm trying to figure out why I'm getting a pile of cookie errors in my
logs with libapreq2.

Is it the library's fault, the browser's fault, or mine? Apologies for
the wide post.

This is what gets sent to my browser to set the cookie:

  Set-Cookie : SID=MxQdbX8AAAIAAC2SPdgAAAAA|3152a7bf6536e6e315d28dc6b7af95b51929d2e0; path=/ UID=MxQdbX8AAAIAAC2SPdgAAAAA|3152a7bf6536e6e315d28dc6b7af95b51929d2e0; path=/login; expires=Thu, 18-Dec-2008 18:56:14 GMT

And here are examples of what is being sent back (as recorded in my logs
by dumping $r->headers_in ):

Normal response:
----------------
  'Cookie' => 'UID=Kk6jHn8AAAIAAC2SPdcAAAAA|ed1a2362e0e16a67b62127b1ffc2e210a9980007; SID=Kk6jHn8AAAIAAC2SPdcAAAAA|ed1a2362e0e16a67b62127b1ffc2e210a9980007'

COOKIE ERROR: Expected token not present
----------------------------------------
'Cookie' => 'SID=4QIQ4MCoAzMAAErUJsgAAAAL|45b7d65984403141ca3a8f02f9a9dadec45160ae; path=/,UID=4QIQ4MCoAzMAAErUJsgAAAAL|45b7d65984403141ca3a8f02f9a9dadec45160ae; path=/; expires=Fri, 26-Sep-2008 21:44:46 GMT',

'Cookie' => 'SID=ORH0a8CoAzMAAHxVGG0AAAAD|d2778aeb1269255144233dae059b62cdcb4dab2c; path=/,UID=ORH0a8CoAzMAAHxVGG0AAAAD|d2778aeb1269255144233dae059b62cdcb4dab2c; path=/; expires=Sat, 11-Oct-2008 17:41:04 GMT',

COOKIE ERROR: Conflicting information
-------------------------------------
'Cookie' => '__utma=8.1e+7.1.0e+9.1.0e+9.1.0e+9.1.0e+9.1; $Domain="xxxxxxxxxx.co.uk"; $Path="/"',
'Cookie2' => '$Version="1"',

'Cookie' => 'UID=HP8b38CoAzMAAG0NVvsAAAAH|04f35dbddf07ec15acbc989cdf2de0a23d083624; $Path=/',

'Cookie' => 'SID=RoKYJ8CoAzMAACxLEAAAAAAH|286038b189ea681692666be9dfa242c047e13d73; $Path=/; UID=RoKYJ8CoAzMAACxLEAAAAAAH|286038b189ea681692666be9dfa242c047e13d73; $Path=/',

'Cookie' => 'SID=bHo4sX8AAAIAAG7cbFQAAAAH|fff303e1041fe68d652d0b94ca32f862241899a3; $Path=/; UID=bHo4sX8AAAIAAG7cbFQAAAAH|fff303e1041fe68d652d0b94ca32f862241899a3; $Path=/',



Any advice appreciated

thanks

Clint


Re: Cookie errors

Posted by Kurt Hansen <kh...@charityweb.net>.
HI,

Quick response on one of your errors. Not sure if it will effect others.
> I'm trying to figure out why I'm getting a pile of cookie errors in my
> logs with libapreq2.
>
> Is it the library's fault, the browser's fault, or mine? Apologies for
> the wide post.
>
> This is what gets sent to my browser to set the cookie:
>
>   Set-Cookie : SID=MxQdbX8AAAIAAC2SPdgAAAAA|3152a7bf6536e6e315d28dc6b7af95b51929d2e0; path=/ UID=MxQdbX8AAAIAAC2SPdgAAAAA|3152a7bf6536e6e315d28dc6b7af95b51929d2e0; path=/login; expires=Thu, 18-Dec-2008 18:56:14 GMT
>
> And here are examples of what is being sent back (as recorded in my logs
> by dumping $r->headers_in ):
>
> Normal response:
> ----------------
>   'Cookie' => 'UID=Kk6jHn8AAAIAAC2SPdcAAAAA|ed1a2362e0e16a67b62127b1ffc2e210a9980007; SID=Kk6jHn8AAAIAAC2SPdcAAAAA|ed1a2362e0e16a67b62127b1ffc2e210a9980007'
>
> COOKIE ERROR: Expected token not present
>   
I got this error before I started uri escaping/unescaping the values 
that I put into/took out of the cookie.
I just used URI::Escape and haven't seen the error since.

I think there was some discussion earlier on this list which is why I 
started doing it.

Hope that helps.

Take care,

Kurt Hansen