httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r726034 - /httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
Date Fri, 12 Dec 2008 15:18:21 GMT
Author: jorton
Date: Fri Dec 12 07:18:21 2008
New Revision: 726034

URL: http://svn.apache.org/viewvc?rev=726034&view=rev
Log:
* modules/ssl/ssl_engine_config.c (ssl_cmd_SSLSessionCache): Allow
  using socache provider config defaults by omitting the arguments, so
  e.g.  "SSLSessionCache shmcb" or even "SSLSessionCache default"
  should now DTRT.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_config.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_config.c?rev=726034&r1=726033&r2=726034&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_config.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_config.c Fri Dec 12 07:18:21 2008
@@ -949,7 +949,7 @@
                                     const char *arg)
 {
     SSLModConfigRec *mc = myModConfig(cmd->server);
-    const char *err, *sep;
+    const char *err, *sep, *name;
     long enabled_flags;
 
     if ((err = ap_check_cmd_context(cmd, GLOBAL_ONLY))) {
@@ -974,8 +974,16 @@
          * doing it by default if "none" is used. */
         mc->sesscache_mode = enabled_flags;
     }
-    else if ((sep = ap_strchr_c(arg, ':')) != NULL) {
-        char *name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
+    else {
+        /* Argument is of form 'name:args' or just 'name'. */
+        sep = ap_strchr_c(arg, ':');
+        if (sep) {
+            name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
+            sep++;
+        }
+        else {
+            name = arg;
+        }
 
         /* Find the provider of given name. */
         mc->sesscache = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP,
@@ -984,7 +992,7 @@
         if (mc->sesscache) {
             /* Cache found; create it, passing anything beyond the colon. */
             mc->sesscache_mode = enabled_flags;
-            err = mc->sesscache->create(&mc->sesscache_context, sep + 1, 
+            err = mc->sesscache->create(&mc->sesscache_context, sep, 
                                         cmd->temp_pool, cmd->pool);
         }
         else {
@@ -1002,10 +1010,6 @@
                                "(known names: %s)", name, all_names);
         }
     }
-    else {
-        err = apr_psprintf(cmd->pool, "'%s' session cache not supported or missing argument",
-                           arg);
-    }
 
     if (err) {
         return apr_psprintf(cmd->pool, "SSLSessionCache: %s", err);



Mime
View raw message