- don't convert original $_SERVER entry to string
[m6w6/ext-http] / http_date_api.c
index 16b5661e859127f2f6e86526253baef664f8d4e9..10f3463a437c8efd2ab5cee7636f8c22ba2815f9 100644 (file)
@@ -6,17 +6,14 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2005, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
 /* $Id$ */
 
-#ifdef HAVE_CONFIG_H
-#      include "config.h"
-#endif
-
 #include "php_http.h"
+
 #include "php_http_api.h"
 #include "php_http_date_api.h"
 
@@ -207,11 +204,11 @@ static inline time_t parse_date(const char *date)
        while (*date && (part < 6)) {
                int found = 0;
 
-               while (*date && !isalnum(*date)) {
+               while (*date && !HTTP_IS_CTYPE(alnum, *date)) {
                        date++;
                }
 
-               if (isalpha(*date)) {
+               if (HTTP_IS_CTYPE(alpha, *date)) {
                        /* a name coming up */
                        char buf[32] = "";
                        size_t len;
@@ -245,7 +242,7 @@ static inline time_t parse_date(const char *date)
                        }
                        date += len;
                }
-               else if (isdigit(*date)) {
+               else if (HTTP_IS_CTYPE(digit, *date)) {
                        /* a digit */
                        int val;
                        char *end;