* remove obsolete include
[m6w6/ext-http] / http_api.c
index b16da00430999c182e177d656de9da84a0de02f9..6f39434d7b76ef6e429db5b5cce86ad8a1fcb77d 100644 (file)
@@ -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;
                }
        }
 }