From 73f46fcdbfc3118966ca34e2a66bfed298c187ad Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 21 Feb 2005 16:12:00 +0000 Subject: [PATCH] * fixed typo * use php_stream_stat_path() instead of php_stat() --- http_api.c | 9 ++++++--- php_http_api.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/http_api.c b/http_api.c index b16da00..817cdc1 100644 --- a/http_api.c +++ b/http_api.c @@ -1061,9 +1061,12 @@ PHP_HTTP_API inline time_t _http_lmod(const void *data_ptr, const http_send_mode default: { - zval mtime; - php_stat(Z_STRVAL_P((zval *) data_ptr), Z_STRLEN_P((zval *) data_ptr), 6, &mtime TSRMLS_CC); - return Z_LVAL(mtime); + if (!HTTP_G(ssb).sb.st_mtime) { + if(php_stream_stat_path(Z_STRVAL_P((zval *) data_ptr), &HTTP_G(ssb))) { + return 0; + } + } + return HTTP_G(ssb).sb.st_mtime; } } } diff --git a/php_http_api.h b/php_http_api.h index b6371a3..5dd7de8 100644 --- a/php_http_api.h +++ b/php_http_api.h @@ -185,7 +185,7 @@ PHP_HTTP_API STATUS _http_chunked_decode(const char *encoded, const size_t encod #define http_split_response(r, h, b) _http_split_response_ex(Z_STRVAL_P(r), Z_STRLEN_P(r), (h), (b) TSRMLS_CC) #define http_split_response_ex(r, l, h, b) _http_split_response_ex((r), (l), (h), (b) TSRMLS_CC) -PHP_HTTP_API STATUS _http_split_response(char *response, size_t repsonse_len, zval *zheaders, zval *zbody TSRMLS_DC); +PHP_HTTP_API STATUS _http_split_response_ex(char *response, size_t repsonse_len, zval *zheaders, zval *zbody TSRMLS_DC); #define http_parse_headers(h, l, a) _http_parse_headers((h), (l), (a) TSRMLS_CC) PHP_HTTP_API STATUS _http_parse_headers(char *header, int header_len, zval *array TSRMLS_DC); -- 2.30.2