dirplex: Inverted the default root capture behaviour and changed its flag.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 11 Jan 2014 09:27:05 +0000 (10:27 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 11 Jan 2014 09:27:05 +0000 (10:27 +0100)
doc/dirplex.doc
src/dirplex/conf.c

index 7080bc2..e2769d7 100644 (file)
@@ -193,9 +193,10 @@ The following configuration directives are recognized:
        be a named request handler specified either in the same
        `.htrc` file or elsewhere. The *capture* directive accepts no
        follow-up lines. Note that the `X-Ash-File` header is not
-       added to requests passed via *capture* directives.  If 'FLAGS'
-       contain the character `R`, this *capture* directive will be
-       ignored if it is in the root directory that *dirplex* serves.
+       added to requests passed via *capture* directives. Normally,
+       *capture* directives will be ignored if they appear in the
+       root directory that *dirplex* serves, but not if 'FLAGS'
+       contain the character `D`.
 
 MATCHING
 --------
index 95f643a..76624a7 100644 (file)
@@ -266,9 +266,9 @@ struct config *readconfig(char *file)
            if(cf->capture != NULL)
                free(cf->capture);
            cf->capture = sstrdup(s->argv[1]);
-           cf->caproot = 1;
-           if((s->argc > 2) && strchr(s->argv[2], 'R'))
-               cf->caproot = 0;
+           cf->caproot = 0;
+           if((s->argc > 2) && strchr(s->argv[2], 'D'))
+               cf->caproot = 1;
        } else if(!strcmp(s->argv[0], "eof")) {
            break;
        } else {