projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- changelog
[m6w6/ext-http]
/
http_date_api.c
diff --git
a/http_date_api.c
b/http_date_api.c
index 31898de486972122ccc0d77ba5345d209d093227..32efdfb8bc6b706c6af6c480d4dda2100c0a2fe1 100644
(file)
--- a/
http_date_api.c
+++ b/
http_date_api.c
@@
-12,11
+12,8
@@
/* $Id$ */
/* $Id$ */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include "php_http.h"
#include "php_http.h"
+
#include "php_http_api.h"
#include "php_http_date_api.h"
#include "php_http_api.h"
#include "php_http_date_api.h"
@@
-162,7
+159,7
@@
PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC)
/* }}} */
/* {{{ time_t http_parse_date(char *) */
/* }}} */
/* {{{ time_t http_parse_date(char *) */
-PHP_HTTP_API time_t _http_parse_date
(const char *date
TSRMLS_DC)
+PHP_HTTP_API time_t _http_parse_date
_ex(const char *date, zend_bool silent
TSRMLS_DC)
{
time_t t = -1;
{
time_t t = -1;
@@
-183,7
+180,7
@@
PHP_HTTP_API time_t _http_parse_date(const char *date TSRMLS_DC)
putenv(tzput);
#endif
putenv(tzput);
#endif
- if (-1 == t) {
+ if (-1 == t
&& !silent
) {
http_error_ex(HE_NOTICE, HTTP_E_RUNTIME, "Could not parse date: %s", date);
}
http_error_ex(HE_NOTICE, HTTP_E_RUNTIME, "Could not parse date: %s", date);
}
@@
-207,11
+204,11
@@
static inline time_t parse_date(const char *date)
while (*date && (part < 6)) {
int found = 0;
while (*date && (part < 6)) {
int found = 0;
- while (*date && !
isalnum(
*date)) {
+ while (*date && !
HTTP_IS_CTYPE(alnum,
*date)) {
date++;
}
date++;
}
- if (
isalpha(
*date)) {
+ if (
HTTP_IS_CTYPE(alpha,
*date)) {
/* a name coming up */
char buf[32] = "";
size_t len;
/* 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;
}
}
date += len;
}
- else if (
isdigit(
*date)) {
+ else if (
HTTP_IS_CTYPE(digit,
*date)) {
/* a digit */
int val;
char *end;
/* a digit */
int val;
char *end;