From: wessels <> Date: Thu, 9 Nov 2000 03:22:16 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1782 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=651801ec99e799400a359cfa39517198fc3db63d;p=thirdparty%2Fsquid.git DW: - 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(). --- diff --git a/lib/rfc1123.c b/lib/rfc1123.c index f43c25dee6..95f9c713fd 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -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 */