You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1998/02/19 21:38:50 UTC
!* STOP 1.3b5 *! Error in Config Parsing found
Hi,
Please try apache-1.3b5 with the following config file:
--snip--
<DirectoryMatch one two three>
</DirectoryMatch>
--snip--
I was expecting:
Syntax error on line 2 of /home/martin/pgtm0035/apachen/src/error.conf:
Multiple <DirectoryMatch> arguments not (yet) supported.
Instead I got:
</DirectoryMatch>
The reason seems to lie in one of the recent changes to http_core.c:
the cmd->info value is checked _after_ the srm_command_loop() call,
but this call modifies *cmd and thus cd->info is the info of
a different directive.
Wait for a final patch from me, it looks similar to the following lines,
repeated for <Files> and <Location> sections:
Martin
@@ -965,6 +964,7 @@
void *new_dir_conf = create_per_dir_config (cmd->pool);
regex_t *r = NULL;
const char *old_end_token;
+ const command_rec *thiscmd = cmd->cmd;
const char *err = check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
if (err != NULL) return err;
@@ -978,7 +978,7 @@
#endif
cmd->override = OR_ALL|ACCESS_CONF;
- if (cmd->info) { /* <DirectoryMatch> */
+ if (thiscmd->cmd_data) { /* <DirectoryMatch> */
r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
}
else if (!strcmp(cmd->path, "~")) {
@@ -991,13 +991,13 @@
}
old_end_token = cmd->end_token;
- cmd->end_token = cmd->info ? end_directorymatch_section : end_directory_section;
+ cmd->end_token = thiscmd->cmd_data ? end_directorymatch_section : end_directory_section;
errmsg = srm_command_loop (cmd, new_dir_conf);
if (errmsg == NULL) {
errmsg = missing_endsection(cmd, 1);
}
cmd->end_token = old_end_token;
- if (errmsg != (cmd->info ? end_directorymatch_section : end_directory_section))
+ if (errmsg != (thiscmd->cmd_data ? end_directorymatch_section : end_directory_section))
return errmsg;
conf = (core_dir_config *)get_module_config(new_dir_conf, &core_module);
@@ -1006,7 +1006,7 @@
add_per_dir_conf (cmd->server, new_dir_conf);
if (*arg != '\0')
- return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "DirectoryMatch" : "Directory",
+ return pstrcat (cmd->pool, "Multiple ", thiscmd->name,
"> arguments not (yet) supported.", NULL);
cmd->path = old_path;
--
| S I E M E N S | <Ma...@mch.sni.de> | 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
Re: !* STOP 1.3b5 *! Error in Config Parsing found
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Thu, Feb 19, 1998 at 09:38:50PM +0100, Martin Kraemer wrote:
> I was expecting:
> Syntax error on line 2 of /home/martin/pgtm0035/apachen/src/error.conf:
> Multiple <DirectoryMatch> arguments not (yet) supported.
>
> Instead I got:
> </DirectoryMatch>
Maybe I should have added that ANY (correct) USE of a <***Match> directive
will fail as well when used with 1.3b5! I think. Please try.
Martin
--
| S I E M E N S | <Ma...@mch.sni.de> | 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
[PATCH] fix Config Parsing (was: !* STOP 1.3b5 *! Error in Config Parsing found)
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Thu, Feb 19, 1998 at 09:38:50PM +0100, Martin Kraemer wrote:
> Wait for a final patch from me, it looks similar to the following lines,
> repeated for <Files> and <Location> sections:
Here's a proposed patch. Please check it out before checking it in.
Martin
--
| S I E M E N S | <Ma...@mch.sni.de> | 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
Re: !* STOP 1.3b5 *! Error in Config Parsing found
Posted by Dean Gaudet <dg...@arctic.org>.
Yup this was me cleaning up some things after 1.3b5 was rolled... guess I
goofed.
Dean
On Fri, 20 Feb 1998, Martin Kraemer wrote:
> On Thu, Feb 19, 1998 at 05:07:02PM -0600, Randy Terbush wrote:
> > Any progress on this Martin? Are we holding this release?
>
> No, I just re-checked, and the erroneous code slipped in _after_ the
> 1.3b5 snapshot. So what I said is a fix to 1.3b6-dev, and 1.3b5 is clean.
>
> Go ahead, Randy!
>
> Martin
> --
> | S I E M E N S | <Ma...@mch.sni.de> | 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
>
Re: !* STOP 1.3b5 *! Error in Config Parsing found
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Thu, Feb 19, 1998 at 05:07:02PM -0600, Randy Terbush wrote:
> Any progress on this Martin? Are we holding this release?
No, I just re-checked, and the erroneous code slipped in _after_ the
1.3b5 snapshot. So what I said is a fix to 1.3b6-dev, and 1.3b5 is clean.
Go ahead, Randy!
Martin
--
| S I E M E N S | <Ma...@mch.sni.de> | 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
Re: !* STOP 1.3b5 *! Error in Config Parsing found
Posted by Randy Terbush <ra...@covalent.net>.
Any progress on this Martin? Are we holding this release?
-Randy
Martin Kraemer <Ma...@mch.sni.de> writes:
> Hi,
> Please try apache-1.3b5 with the following config file:
> --snip--
> <DirectoryMatch one two three>
> </DirectoryMatch>
> --snip--
>
> I was expecting:
> Syntax error on line 2 of /home/martin/pgtm0035/apachen/src/error.conf:
> Multiple <DirectoryMatch> arguments not (yet) supported.
>
> Instead I got:
> </DirectoryMatch>
>
> The reason seems to lie in one of the recent changes to http_core.c:
> the cmd->info value is checked _after_ the srm_command_loop() call,
> but this call modifies *cmd and thus cd->info is the info of
> a different directive.
>
> Wait for a final patch from me, it looks similar to the following lines,
> repeated for <Files> and <Location> sections:
>
> Martin
>
> @@ -965,6 +964,7 @@
> void *new_dir_conf = create_per_dir_config (cmd->pool);
> regex_t *r = NULL;
> const char *old_end_token;
> + const command_rec *thiscmd = cmd->cmd;
>
> const char *err = check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
> if (err != NULL) return err;
> @@ -978,7 +978,7 @@
> #endif
> cmd->override = OR_ALL|ACCESS_CONF;
>
> - if (cmd->info) { /* <DirectoryMatch> */
> + if (thiscmd->cmd_data) { /* <DirectoryMatch> */
> r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
> }
> else if (!strcmp(cmd->path, "~")) {
> @@ -991,13 +991,13 @@
> }
>
> old_end_token = cmd->end_token;
> - cmd->end_token = cmd->info ? end_directorymatch_section : end_directory_section;
> + cmd->end_token = thiscmd->cmd_data ? end_directorymatch_section : end_directory_section;
> errmsg = srm_command_loop (cmd, new_dir_conf);
> if (errmsg == NULL) {
> errmsg = missing_endsection(cmd, 1);
> }
> cmd->end_token = old_end_token;
> - if (errmsg != (cmd->info ? end_directorymatch_section : end_directory_section))
> + if (errmsg != (thiscmd->cmd_data ? end_directorymatch_section : end_directory_section))
> return errmsg;
>
> conf = (core_dir_config *)get_module_config(new_dir_conf, &core_module);
> @@ -1006,7 +1006,7 @@
> add_per_dir_conf (cmd->server, new_dir_conf);
>
> if (*arg != '\0')
> - return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "DirectoryMatch" : "Directory",
> + return pstrcat (cmd->pool, "Multiple ", thiscmd->name,
> "> arguments not (yet) supported.", NULL);
>
> cmd->path = old_path;
> --
> | S I E M E N S | <Ma...@mch.sni.de> | 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