Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 18656 invoked by uid 6000); 19 Oct 1997 21:31:31 -0000 Received: (qmail 18649 invoked from network); 19 Oct 1997 21:31:30 -0000 Received: from thoth.mch.sni.de (192.35.17.2) by taz.hyperreal.org with SMTP; 19 Oct 1997 21:31:30 -0000 Received: from deejai.mch.sni.de (deejai.mch.sni.de [139.25.113.10]) by thoth.mch.sni.de (8.8.7/8.8.7) with ESMTP id XAA24063 for ; Sun, 19 Oct 1997 23:31:02 +0200 (MDT) Received: (from martin@localhost) by deejai.mch.sni.de (8.8.7/8.8.7) id XAA16481; Sun, 19 Oct 1997 23:31:02 +0200 (MET DST) Message-ID: <19971019233100.10563@deejai.mch.sni.de> Date: Sun, 19 Oct 1997 23:31:00 +0200 From: Martin Kraemer To: new-httpd@apache.org Subject: [PATCH] Reject multiple arguments to <...> block directives Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=Tprm0S8XgL7H0Dto X-Mailer: Mutt 0.69 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org --Tprm0S8XgL7H0Dto Content-Type: text/plain; charset=us-ascii Some of the <...> directives allow multiple arguments, some don't. I was tricked into believing that and belonged to the former type (but was wrong). IMO, it would be good to "make it work" symmetrically, i.e., all <...> directives should accept multiple arguments (ok, the syntax is not a goot candidate, but we have now.) Until this has been discussed over (would it be sufficient to insert a do {...} while (*arg); loop into dirsection() to make it accept multiple paths?) the appended patch at least makes the user aware of an (otherwise silently ignored) argument. Martin -- | S I E M E N S | | Siemens Nixdorf | ------------- | Voice: +49-89-636-46021 | Informationssysteme AG | N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request --Tprm0S8XgL7H0Dto Content-Type: text/plain; charset=us-ascii Content-Description: Reject multiple arguments to <...> directives Content-Disposition: attachment; filename="multi.patch" --- http_core.c.orig Sun Oct 19 23:19:10 1997 +++ http_core.c Sun Oct 19 23:19:18 1997 @@ -817,7 +817,11 @@ conf->r = r; add_per_dir_conf (cmd->server, new_dir_conf); - + + if (*arg != '\0') + return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "DirectoryMatch" : "Directory", + "> arguments not (yet) supported.", NULL); + cmd->path = old_path; cmd->override = old_overrides; @@ -867,6 +871,10 @@ add_per_url_conf (cmd->server, new_url_conf); + if (*arg != '\0') + return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "LocationMatch" : "Location", + "> arguments not (yet) supported.", NULL); + cmd->path = old_path; cmd->override = old_overrides; @@ -928,6 +936,10 @@ add_file_conf (c, new_file_conf); + if (*arg != '\0') + return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "FilesMatch" : "Files", + "> arguments not (yet) supported.", NULL); + cmd->path = old_path; cmd->override = old_overrides; --Tprm0S8XgL7H0Dto--