1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-04 05:42:12 +03:00

mod_lua: Detect "All" or "None" before putting together a potentially blank (or static) string.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555063 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Gruno
2014-01-03 12:09:04 +00:00
parent eb7516d35a
commit 1ae03d3bcc

View File

@@ -649,7 +649,14 @@ static const char* lua_ap_allowoverrides(request_rec* r)
{
int opts;
opts = ap_allow_overrides(r);
return apr_psprintf(r->pool, "%s %s %s %s %s %s", (opts&OR_NONE) ? "None" : "", (opts&OR_LIMIT) ? "Limit" : "", (opts&OR_OPTIONS) ? "Options" : "", (opts&OR_FILEINFO) ? "FileInfo" : "", (opts&OR_AUTHCFG) ? "AuthCfg" : "", (opts&OR_INDEXES) ? "Indexes" : "" );
if ( (opts & OR_ALL) == OR_ALL) {
return "All";
}
else if (opts == OR_NONE) {
return "None";
}
return apr_psprintf(r->pool, "%s %s %s %s %s", (opts & OR_LIMIT) ? "Limit" : "", (opts & OR_OPTIONS) ? "Options" : "", (opts & OR_FILEINFO) ? "FileInfo" : "", (opts & OR_AUTHCFG) ? "AuthCfg" : "", (opts & OR_INDEXES) ? "Indexes" : "" );
}
static int lua_ap_started(request_rec* r)