Re: cvs: php-src /ext/session session.c

From: Date: Thu, 11 Dec 2008 08:47:19 +0000
Subject: Re: cvs: php-src /ext/session session.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-54858@lists.php.net to get a copy of this message
On Thu, 11 Dec 2008, Scott MacVicar wrote: > scottmac Thu Dec 11 01:20:58 2008 UTC > > Modified files: > /php-src/ext/session session.c > Log: > Fix bug #35975 - Session cookie expires date format isn't the most compatible. Sync to > that of setcookie(). > > > > > http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.498&r2=1.499&diff_format=u > Index: php-src/ext/session/session.c > diff -u php-src/ext/session/session.c:1.498 php-src/ext/session/session.c:1.499 > --- php-src/ext/session/session.c:1.498 Mon Nov 17 11:26:23 2008 > +++ php-src/ext/session/session.c Thu Dec 11 01:20:58 2008 > @@ -17,7 +17,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: session.c,v 1.498 2008/11/17 11:26:23 felipe Exp $ */ > +/* $Id: session.c,v 1.499 2008/12/11 01:20:58 scottmac Exp $ */ > > #ifdef HAVE_CONFIG_H > #include "config.h" > @@ -42,7 +42,7 @@ > #include "ext/standard/md5.h" > #include "ext/standard/sha1.h" > #include "ext/standard/php_var.h" > -#include "ext/standard/datetime.h" > +#include "ext/date/php_date.h" > #include "ext/standard/php_lcg.h" > #include "ext/standard/url_scanner_ex.h" > #include "ext/standard/php_rand.h" /* for RAND_MAX */ > @@ -1175,7 +1175,7 @@ > t = tv.tv_sec + PS(cookie_lifetime); > > if (t > 0) { > - date_fmt = php_std_date(t TSRMLS_CC); > + date_fmt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s > T")-1, t, 0 TSRMLS_CC); There is a constant for this: DATE_FORMAT_RFC850 (also as DATE_COOKIE in userland), but that uses: "l, d-M-y H:i:s T" -- which I deducted from several RFCs. Those constants should be moved to a .h file though regards, Derick -- HEAD before 5_3!: http://tinyurl.com/6d2esb http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

« previous php.cvs (#54858) next »