X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=6f39434d7b76ef6e429db5b5cce86ad8a1fcb77d;hp=b16da00430999c182e177d656de9da84a0de02f9;hb=8bc520ceaec7aa783bc4cd5ace758d6fb37ed875;hpb=a856e9055f2de647fdb3c7ff89238f6b17a1217e diff --git a/http_api.c b/http_api.c index b16da00..6f39434 100644 --- a/http_api.c +++ b/http_api.c @@ -34,7 +34,6 @@ #include "ext/standard/php_string.h" #include "ext/standard/php_smart_str.h" #include "ext/standard/php_lcg.h" -#include "ext/standard/php_filestat.h" #include "SAPI.h" @@ -1061,9 +1060,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; } } }