X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_date_api.c;h=10f3463a437c8efd2ab5cee7636f8c22ba2815f9;hb=c40902a33546532405c17c6216c347874f8cb8ff;hp=02f619c27a18d7713188d3c06bb013d525a70c0b;hpb=d8523b1334eaf61f71233401fe401925230fe1e5;p=m6w6%2Fext-http diff --git a/http_date_api.c b/http_date_api.c index 02f619c..10f3463 100644 --- a/http_date_api.c +++ b/http_date_api.c @@ -6,22 +6,17 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ /* $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include "php_http.h" + #include "php_http_api.h" #include "php_http_date_api.h" -ZEND_EXTERN_MODULE_GLOBALS(http); - static inline int check_day(const char *day, size_t len); static inline int check_month(const char *month); static inline int check_tzone(const char *tzone); @@ -209,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; @@ -247,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;