1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

Only ask for the stat info we really use.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467822 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Guenter Knauf
2013-04-14 20:03:07 +00:00
parent 8c101dfe70
commit b8fc4783c7

View File

@@ -670,7 +670,7 @@ static int lua_ap_sendfile(lua_State *L)
luaL_checktype(L, 2, LUA_TSTRING);
r = ap_lua_check_request_rec(L, 1);
filename = lua_tostring(L, 2);
apr_stat(&file_info, filename, APR_FINFO_NORM, r->pool);
apr_stat(&file_info, filename, APR_FINFO_MIN, r->pool);
if (file_info.filetype == APR_NOFILE || file_info.filetype == APR_DIR) {
lua_pushboolean(L, 0);
}
@@ -1216,7 +1216,7 @@ static int lua_ap_stat(lua_State *L)
luaL_checktype(L, 2, LUA_TSTRING);
r = ap_lua_check_request_rec(L, 1);
filename = lua_tostring(L, 2);
if (apr_stat(&file_info, filename, APR_FINFO_NORM, r->pool) == OK) {
if (apr_stat(&file_info, filename, APR_FINFO_MIN, r->pool) == OK) {
lua_newtable(L);
lua_pushstring(L, "mtime");