httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/src apreq.c apreq_cookie.c
Date Wed, 31 Dec 2003 16:05:00 GMT
joes        2003/12/31 08:05:00

  Modified:    .        CHANGES
               glue/perl/t/response/TestApReq cookie.pm
               src      apreq.c apreq_cookie.c
  Log:
  Must use apr_time_from_sec to convert seconds to apr_time_t values. Without it cookie expires
attributes always used the current date, which (erroneously) instructs the UA to expire the
cookie immediately.
  
  Revision  Changes    Path
  1.24      +12 -1     httpd-apreq-2/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/CHANGES,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- CHANGES	11 Dec 2003 16:16:42 -0000	1.23
  +++ CHANGES	31 Dec 2003 16:05:00 -0000	1.24
  @@ -1,7 +1,16 @@
   /** @page CHANGES
   
  +
   @section v2_03_dev Changes with libapreq2-2.03-dev
   
  +
  +- December 31, 2003 - C API [Swen Schillig, joes]
  +
  +Fixed bug in calculation of Netscape cookie expiration dates.
  +apr_time_t is measured in microseconds, not seconds, which
  +threw off the arithmetic; apr_time_from_sec was needed for
  +the conversion.
  +
   - December 11, 2003 - C API [Max Kellermann]
   
   Fix segfault caused by invalid %-escape sequence in query string.
  @@ -17,6 +26,7 @@
   
   @section v2_01_dev Changes with libapreq2-2.01-dev
   
  +
   - November 7, 2003 - build system [joes]
   
   Skip Apache::Test tests in env/ when Apache::Test is unavailable.
  @@ -39,8 +49,10 @@
   environment at runtime (determining the environment at load-time
   was problematic on non-ELF systems).
   
  +
   @section v2_0_0 Changes with libapreq2-2.00-dev
   
  +
   - October 24, 2003 - C API: libapreq_cgi.c [randyk, joes]
   
   CGI environment defined by env/libapreq_cgi.c is functional
  @@ -93,7 +105,6 @@
   If the source and destination strings are represented by the same
   pointer - e.g. if called as apreq_unescape(s) - string s is modified
   incorrectly in general.  Patch includes new unit test.
  -
   
   - July 16, 2003 - Perl API [joes]
   
  
  
  
  1.10      +1 -1      httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm
  
  Index: cookie.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/cookie.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- cookie.pm	13 Nov 2003 13:16:35 -0000	1.9
  +++ cookie.pm	31 Dec 2003 16:05:00 -0000	1.10
  @@ -32,13 +32,13 @@
       else {
           my @expires;
           @expires = ("expires", $req->param('expires')) if $req->param('expires');
  -
           my $cookie = Apache::Cookie->new($r, name => "foo",
                                               value => "bar", @expires);
           if ($test eq "bake") {
               $cookie->bake;
           }
           elsif ($test eq "bake2") {
  +            $cookie->set_attr(version => 1);
               $cookie->bake2;
           }
           $r->print($cookie->value);
  
  
  
  1.30      +1 -1      httpd-apreq-2/src/apreq.c
  
  Index: apreq.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/src/apreq.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- apreq.c	16 Nov 2003 04:03:46 -0000	1.29
  +++ apreq.c	31 Dec 2003 16:05:00 -0000	1.30
  @@ -143,7 +143,7 @@
   
       when = apr_time_now();
       if (strcasecmp(time_str,"now")) 
  -        when += apreq_atoi64t(time_str);
  +        when += apr_time_from_sec(apreq_atoi64t(time_str));
   
       if ( apr_time_exp_gmt(&tms, when) != APR_SUCCESS )
           return NULL;
  
  
  
  1.21      +2 -2      httpd-apreq-2/src/apreq_cookie.c
  
  Index: apreq_cookie.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/src/apreq_cookie.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apreq_cookie.c	26 Sep 2003 13:58:33 -0000	1.20
  +++ apreq_cookie.c	31 Dec 2003 16:05:00 -0000	1.21
  @@ -89,7 +89,7 @@
       if (!strcasecmp(time_str, "now"))
           c->max_age = 0;
       else
  -        c->max_age = apreq_atoi64t(time_str);
  +        c->max_age = apr_time_from_sec(apreq_atoi64t(time_str));
   }
   
   static int has_rfc_cookie(void *ctx, const char *key, const char *val)
  @@ -478,7 +478,7 @@
       return apr_snprintf(buf, len, format, c->v.name, c->v.data, c->version,
                           NULL2EMPTY(c->path), NULL2EMPTY(c->domain), 
                           NULL2EMPTY(c->port), NULL2EMPTY(c->comment), 
  -                        NULL2EMPTY(c->commentURL), c->max_age);
  +                        NULL2EMPTY(c->commentURL), apr_time_sec(c->max_age));
   }
   
   
  
  
  

Mime
View raw message