]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Thu, 9 Nov 2000 03:22:16 +0000 (03:22 +0000)
committerwessels <>
Thu, 9 Nov 2000 03:22:16 +0000 (03:22 +0000)
 - Two bugs with yesterday's date parsing changes.  (1) Need to incrment
   past "," after strchr(), and (2) struct tm tm needs to be static
   in parse_date2().

lib/rfc1123.c

index f43c25dee6ae6f7cacb35c974c6c9d4e5f3d3016..95f9c713fd911a187f09b2ff2bd159e25bb78e47 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.26 2000/11/07 23:37:35 wessels Exp $
+ * $Id: rfc1123.c,v 1.27 2000/11/08 20:22:16 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -135,6 +135,7 @@ parse_date1(const char *str)
     s = strchr(str, ',');
     if (NULL == s)
        return NULL;
+    s++;
     while (*s == ' ')
        s++;
     /* backup if month is only one digit */
@@ -165,12 +166,13 @@ parse_date2(const char *str)
 {
     /* Thu, 10 Jan 1993 01:29:59 GMT */
     const char *s;
-    struct tm tm;
+    static struct tm tm;
     assert(NULL != str);
     memset(&tm, '\0', sizeof(struct tm));
     s = strchr(str, ',');
     if (NULL == s)
        return NULL;
+    s++;
     while (*s == ' ')
        s++;
     /* backup if month is only one digit */