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_cookie.c
Date Tue, 03 Aug 2004 22:05:34 GMT
joes        2004/08/03 15:05:34

  Modified:    src      apreq_cookie.c
  Log:
  Accept generic date strings in apreq_cookie_expires
  
  Revision  Changes    Path
  1.31      +6 -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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- apreq_cookie.c	27 Jul 2004 19:48:42 -0000	1.30
  +++ apreq_cookie.c	3 Aug 2004 22:05:34 -0000	1.31
  @@ -18,6 +18,7 @@
   #include "apreq_env.h"
   #include "apr_strings.h"
   #include "apr_lib.h"
  +#include "apr_date.h"
   
   #define RFC      APREQ_COOKIE_VERSION_RFC
   #define NETSCAPE APREQ_COOKIE_VERSION_NETSCAPE
  @@ -49,8 +50,11 @@
   
       if (!strcasecmp(time_str, "now"))
           c->max_age = 0;
  -    else
  -        c->max_age = apr_time_from_sec(apreq_atoi64t(time_str));
  +    else {
  +        c->max_age = apr_date_parse_rfc(time_str);
  +        if (c->max_age == APR_DATE_BAD)
  +            c->max_age = apr_time_from_sec(apreq_atoi64t(time_str));
  +    }
   }
   
   static int has_rfc_cookie(void *ctx, const char *key, const char *val)
  
  
  

Mime
View raw message