Welcome! Log In Create A New Profile

Advanced

Re: fastcgi_cache_key with cookie

December 28, 2011 08:55AM
António P. P. Almeida Wrote:
-------------------------------------------------------
> On 28 Dez 2011 04h15 WET, nginx-forum@nginx.us
> wrote:
>
>
> >> map $http_cookie $session_id {
> >> default '';
> >> ~SESS(?<session_guid>[[:alnum:]]+)
> >> $session_guid;
> >> }
> >>
> >> --- appa
> >>
> >
> > That regex will only get you the cookie name
> (md5 of domain) without
> > the cookie value. You will want the equal sign
> in there so you get
> > both name and value:
> >
> > ~^.*SESS(?<key>[\w\=]+).*$ $key;
> >
> > or just the value:
> >
> > ~^.*SESS.+\=(?<key>[\w]+).*$ $key;
>
> MD5 of the domain? How? AFAIK it's much more
> elaborate than that.
>
> See:
> http://svn.php.net/viewvc/php/php-src/branches/PHP
> _5_3_8/ext/session/session.c?revision=315335&view=
> markup
>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Drupal session cookie is in the form:
session_name = session_id
e.g. SESSc4f381f0375dba8f9670647c311307a9=b051bb99415e65d3d921f7891f3ca91f

The session_name is either
session_name('SESS' . md5($cookie_domain))
from your settings file or
session_name('SESS' . md5(explode('://', $base_url, 2)))
see http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/conf_init/6

Your regex was only getting the session_name and not the session_id
Subject Author Posted

fastcgi_cache_key with cookie

zenw December 27, 2011 12:13AM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 27, 2011 01:38AM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 01:53AM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 01:56AM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 27, 2011 02:36AM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 02:46AM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 02:48AM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 27, 2011 03:02AM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 03:24AM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 27, 2011 04:06AM

Re: fastcgi_cache_key with cookie

brianmercer December 27, 2011 12:01PM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 27, 2011 02:54PM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 08:15PM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 08:35PM

Re: fastcgi_cache_key with cookie

brianmercer December 27, 2011 11:15PM

Re: fastcgi_cache_key with cookie

zenw December 27, 2011 11:28PM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 28, 2011 02:04AM

Re: fastcgi_cache_key with cookie

brianmercer December 28, 2011 08:55AM

Re: fastcgi_cache_key with cookie

António P. P. Almeida December 28, 2011 11:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready