durusmail: quixote-users: ANNOUNCE: scgi 1.2 alpha 2 available
ANNOUNCE: scgi 1.2 alpha 2 available
2004-02-28
2004-03-02
ANNOUNCE: scgi 1.2 alpha 2 available
Neil Schemenauer
2004-03-01
On Fri, Feb 27, 2004 at 09:59:59PM -0600, charles brandt wrote:
> I tried changing my httpd.conf to use the "SCGIHandler On/Off" config as
> mentioned in the scgi-1.2a2/apache2/README:
> 
>     SCGIHandler Off
> 
> 
>     SCGIHandler Off
> 
>
> But with the same result.  It looks like SCGI is still trying to process
> this file, even with those settings.  Strange...

That's definitely a bug.  I've attached a patch that fixes it.

> The second thing is that it looks like the "POST" method to forms still
> doesn't work.  Is this still a known issue?

POST seems to work for me.  If you could give me a way to reproduce
the problem that would help a lot.

  Neil


Index: mod_scgi.c
===================================================================
--- mod_scgi.c  (revision 23588)
+++ mod_scgi.c  (working copy)
@@ -19,6 +19,10 @@
 #define SCGI_PROTOCOL_VERSION "1"
 #define DEFAULT_TIMEOUT  60 /* default socket timeout */

+#define UNSET 0
+#define ENABLED 1
+#define DISABLED 2
+
 /*
  * Configuration record.  Used per-directory configuration data.
  */
@@ -48,7 +52,7 @@
 {
        scgi_cfg *cfg = our_dconfig(r);

-       if (cfg->enabled) {
+       if (cfg->enabled == ENABLED) {
                r->handler = "scgi-handler";
                return OK;
        }
@@ -444,14 +448,15 @@
 {
     scgi_cfg *cfg = apr_pcalloc(p, sizeof(scgi_cfg));

-    cfg->enabled = 0;
-    cfg->addr = NULL;
-    cfg->port = 0;
-    cfg->timeout = 0;
+    cfg->enabled = UNSET;
+    cfg->addr = UNSET;
+    cfg->port = UNSET;
+    cfg->timeout = UNSET;

     return cfg;
 }

+#define MERGE(b, n, a) (n->a == UNSET ? b->a : n->a)

 static void *
 scgi_merge_dir_config(apr_pool_t *p, void *basev, void *newv)
@@ -460,10 +465,10 @@
     scgi_cfg* base = basev;
     scgi_cfg* new = newv;

-    cfg->enabled = new->enabled ? new->enabled : base->enabled;
-    cfg->addr    = new->addr ? new->addr : base->addr;
-    cfg->port    = new->port ? new->port : base->port;
-    cfg->timeout = new->timeout ? new->timeout : base->timeout;
+    cfg->enabled = MERGE(base, new, enabled);
+    cfg->addr = MERGE(base, new, addr);
+    cfg->port = MERGE(base, new, port);
+    cfg->timeout = MERGE(base, new, timeout);

     return cfg;
 }
@@ -497,9 +502,9 @@
         return "not a server command";

     if (flag)
-        cfg->enabled = 1;
+        cfg->enabled = ENABLED;
     else
-        cfg->enabled = 0;
+        cfg->enabled = DISABLED;

     return NULL;
 }


reply