changeset 186:7d1f26e7c728 noffle

[svn] Remove case sensitivity in date parse.
author bears
date Sun, 05 Aug 2001 09:27:17 +0100
parents fed1334d766b
children 166008a80f03
files ChangeLog src/util.c
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Aug 05 09:24:22 2001 +0100
+++ b/ChangeLog	Sun Aug 05 09:27:17 2001 +0100
@@ -11,6 +11,7 @@
   Debug logging is always compiled and selected via noffle.conf. All debug
   logs are classified as all, none, config, control, expire, fetch,
   filter, newsbase, noffle, post, protocol, requests and server.
+* src/util.c: Remove case sensitivity in date parsing.
 
 Tue May 15 2001 Jim Hague <jim.hague@acm.org>
 
--- a/src/util.c	Sun Aug 05 09:24:22 2001 +0100
+++ b/src/util.c	Sun Aug 05 09:27:17 2001 +0100
@@ -1,7 +1,7 @@
 /*
   util.c
 
-  $Id: util.c 300 2001-08-05 08:24:22Z bears $
+  $Id: util.c 301 2001-08-05 08:27:17Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -357,7 +357,7 @@
 	    return (time_t) -1;
 	
 	for ( wday = 0; DOTW[ wday ] != NULL; wday++ )
-	    if ( strncmp( DOTW[ wday ], s, 3 ) == 0 )
+	    if ( strncasecmp( DOTW[ wday ], s, 3 ) == 0 )
 		break;
 
 	if( DOTW[ wday ] == NULL || s[3] != ',' )
@@ -377,7 +377,7 @@
     if ( strlen( s ) < 4 )
 	return (time_t) -1;
     for ( tm.tm_mon = 0; MON[ tm.tm_mon ] != NULL; tm.tm_mon++ )
-	if ( strncmp( MON[ tm.tm_mon ], s, 3 ) == 0 )
+	if ( strncasecmp( MON[ tm.tm_mon ], s, 3 ) == 0 )
 	    break;
 
     if ( MON[ tm.tm_mon ] == NULL )
@@ -418,9 +418,9 @@
     tzoffset = 0;
     while ( isspace( *s ) )
 	s++;
-    if ( strncmp( s, "GMT", 3) == 0 )
+    if ( strncasecmp( s, "GMT", 3) == 0 )
 	s += 3;
-    else if ( strncmp( s, "UT", 2 ) == 0 )
+    else if ( strncasecmp( s, "UT", 2 ) == 0 )
 	s += 2;
     else
     {