Browse Source

cacher: fix stat and skip user stream

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@317 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 15 years ago
parent
commit
ea5e888d9d
  1. 10
      xcache.c

10
xcache.c

@ -704,13 +704,13 @@ static int xc_stat(const char *filename, const char *include_path, struct stat *
}
if (VCWD_STAT(filepath, pbuf) == 0) {
free_alloca(paths);
return FAILURE;
return SUCCESS;
}
}
free_alloca(paths);
return SUCCESS;
return FAILURE;
}
/* }}} */
@ -749,6 +749,10 @@ static int xc_entry_init_key_php(xc_entry_t *xce, char *filename, char *opened_p
return FAILURE;
}
if (strstr(filename, "://") != NULL) {
return FAILURE;
}
php = xce->data.php;
if (XG(stat)) {
@ -1146,6 +1150,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
assert(xc_initized);
TRACE("type = %d\n", h->type);
if (!XG(cacher)) {
op_array = origin_compile_file(h, type TSRMLS_CC);
#ifdef HAVE_XCACHE_OPTIMIZER
@ -1160,6 +1165,7 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
filename = h->opened_path ? h->opened_path : h->filename;
xce.data.php = &php;
if (xc_entry_init_key_php(&xce, filename, opened_path_buffer TSRMLS_CC) != SUCCESS) {
TRACE("failed to init key for %s", filename);
return origin_compile_file(h, type TSRMLS_CC);
}
cache = xce.cache;

Loading…
Cancel
Save