#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"
/* {{{ static inline char *http_curl_getinfoname(CURLINFO) */
static inline char *_http_curl_getinfoname(CURLINFO i TSRMLS_DC)
{
-#define CASE(I) case CURLINFO_ ##I : return pretty_key(estrdup( #I ), strlen(#I), 0, 0)
+#define CASE(I) case CURLINFO_ ##I : { static char I[] = #I; return pretty_key(I, sizeof(#I)-1, 0, 0); }
switch (i)
{
/* CURLINFO_EFFECTIVE_URL = CURLINFO_STRING +1, */
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;
}
}
}