mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_lua: Decline to serve a request if the script doesn't exist, instead of throwing an internal server error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1370377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -236,6 +236,14 @@ static int lua_handler(request_rec *r)
|
||||
if (strcmp(r->handler, "lua-script")) {
|
||||
return DECLINED;
|
||||
}
|
||||
/* Decline the request if the script does not exist (or is a directory),
|
||||
* rather than just returning internal server error */
|
||||
if (
|
||||
(r->finfo.filetype == APR_NOFILE)
|
||||
|| (r->finfo.filetype & APR_DIR)
|
||||
) {
|
||||
return DECLINED;
|
||||
}
|
||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(01472)
|
||||
"handling [%s] in mod_lua", r->filename);
|
||||
|
||||
|
Reference in New Issue
Block a user