httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1555063 - /httpd/httpd/trunk/modules/lua/lua_request.c
Date Fri, 03 Jan 2014 12:09:05 GMT
Author: humbedooh
Date: Fri Jan  3 12:09:04 2014
New Revision: 1555063

URL: http://svn.apache.org/r1555063
Log:
mod_lua: Detect "All" or "None" before putting together a potentially blank (or static) string.

Modified:
    httpd/httpd/trunk/modules/lua/lua_request.c

Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=1555063&r1=1555062&r2=1555063&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Fri Jan  3 12:09:04 2014
@@ -649,7 +649,14 @@ static const char* lua_ap_allowoverrides
 {
     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) 



Mime
View raw message