From 1ae03d3bcc0a01c7c89d0e6ec0d81134d55fe508 Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Fri, 3 Jan 2014 12:09:04 +0000 Subject: [PATCH] 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 --- modules/lua/lua_request.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index e97c7fb278..3b8d7c545b 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) -- 2.50.1