From: Daniel Gruno Date: Fri, 3 Jan 2014 12:20:13 +0000 (+0000) Subject: mod_lua: Detect "All" or "None" before putting together a potentially blank (or stati... X-Git-Tag: 2.4.8~306 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73d324a4556087267b16bc447780e7b79891446e;p=apache 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/branches/2.4.x@1555070 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index fa8fe25d3c..efd22d059a 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -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)