From: Fredrik Tolf Date: Sat, 11 Jan 2014 09:27:05 +0000 (+0100) Subject: dirplex: Inverted the default root capture behaviour and changed its flag. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=257cd4a2bfad06198e9b0fb0e01476e1f65eff24;p=ashd.git dirplex: Inverted the default root capture behaviour and changed its flag. --- diff --git a/doc/dirplex.doc b/doc/dirplex.doc index 7080bc2..e2769d7 100644 --- a/doc/dirplex.doc +++ b/doc/dirplex.doc @@ -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 -------- diff --git a/src/dirplex/conf.c b/src/dirplex/conf.c index 95f643a..76624a7 100644 --- a/src/dirplex/conf.c +++ b/src/dirplex/conf.c @@ -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 {