cvs: pecl /http http_cache_api.c http_date_api.c php_http_date_api.h
| From: | Michael Wallner | Date: | Sat, 07 Oct 2006 12:45:10 +0000 |
| Subject: | cvs: pecl /http http_cache_api.c http_date_api.c php_http_date_api.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-6466@lists.php.net to get a copy of this message | ||
mike Sat Oct 7 12:45:10 2006 UTC
Modified files:
/pecl/http http_cache_api.c http_date_api.c php_http_date_api.h
Log:
- don't raise notice when checking If-Range header for a last modification date
http://cvs.php.net/viewvc.cgi/pecl/http/http_cache_api.c?r1=1.40&r2=1.41&diff_format=u
Index: pecl/http/http_cache_api.c
diff -u pecl/http/http_cache_api.c:1.40 pecl/http/http_cache_api.c:1.41
--- pecl/http/http_cache_api.c:1.40 Sat May 27 17:20:08 2006
+++ pecl/http/http_cache_api.c Sat Oct 7 12:45:10 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_cache_api.c,v 1.40 2006/05/27 17:20:08 mike Exp $ */
+/* $Id: http_cache_api.c,v 1.41 2006/10/07 12:45:10 mike Exp $ */
#define HTTP_WANT_SAPI
#include "php_http.h"
@@ -85,7 +85,7 @@
chr_ptr = 0;
}
- retval = (t <= http_parse_date(modified));
+ retval = (t <= http_parse_date_ex(modified, 1));
efree(modified);
return retval;
}
http://cvs.php.net/viewvc.cgi/pecl/http/http_date_api.c?r1=1.13&r2=1.14&diff_format=u
Index: pecl/http/http_date_api.c
diff -u pecl/http/http_date_api.c:1.13 pecl/http/http_date_api.c:1.14
--- pecl/http/http_date_api.c:1.13 Wed Sep 27 09:29:55 2006
+++ pecl/http/http_date_api.c Sat Oct 7 12:45:10 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_date_api.c,v 1.13 2006/09/27 09:29:55 mike Exp $ */
+/* $Id: http_date_api.c,v 1.14 2006/10/07 12:45:10 mike Exp $ */
#include "php_http.h"
@@ -159,7 +159,7 @@
/* }}} */
/* {{{ 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;
@@ -180,7 +180,7 @@
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://cvs.php.net/viewvc.cgi/pecl/http/php_http_date_api.h?r1=1.5&r2=1.6&diff_format=u
Index: pecl/http/php_http_date_api.h
diff -u pecl/http/php_http_date_api.h:1.5 pecl/http/php_http_date_api.h:1.6
--- pecl/http/php_http_date_api.h:1.5 Mon Jan 2 15:36:58 2006
+++ pecl/http/php_http_date_api.h Sat Oct 7 12:45:10 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: php_http_date_api.h,v 1.5 2006/01/02 15:36:58 mike Exp $ */
+/* $Id: php_http_date_api.h,v 1.6 2006/10/07 12:45:10 mike Exp $ */
#ifndef PHP_HTTP_DATE_API_H
#define PHP_HTTP_DATE_API_H
@@ -18,8 +18,9 @@
#define http_date(t) _http_date((t) TSRMLS_CC)
PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC);
-#define http_parse_date(d) _http_parse_date((d) TSRMLS_CC)
-PHP_HTTP_API time_t _http_parse_date(const char *date TSRMLS_DC);
+#define http_parse_date(d) _http_parse_date_ex((d), 0 TSRMLS_CC)
+#define http_parse_date_ex(d, s) _http_parse_date_ex((d), (s) TSRMLS_CC)
+PHP_HTTP_API time_t _http_parse_date_ex(const char *date, zend_bool silent TSRMLS_DC);
#endif