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 22:06:58 UTC
[PATCH] Make check_cmd_context() globally available
Here's a solution to what Ken proposed a while ago: with this patch, the
check_cmd_context() function will become globally available, i.e., not
be local to http_core.c any longer.
Furthermore, thanks to Dean's improved </EndSection> code, conditions
can now specify individual section types (NOT_IN_LOCATION, NOT_IN_FILES,
NOT_IN_DIRECTORY).
Note that I renamed NOT_IN_LOC to NOT_IN_LOCATION, therefore THIS PATCH
CONFLICTS WITH the core.sectionnesting.patch I sent earlier today.
The conflict is only one line (the line with the NOT_IN_LOC use).
Part of Ken's proposal was putting the function into util*.c -- that is
impossible now because of the tight binding to the EndSection definitions.
I hope you like the idea of checking the directives' context nonetheless,
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: [PATCH] Take 2: Make check_cmd_context() globally available
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Thu, Feb 19, 1998 at 10:06:58PM +0100, Martin Kraemer wrote:
> Note that I renamed NOT_IN_LOC to NOT_IN_LOCATION, therefore THIS PATCH
> CONFLICTS WITH the core.sectionnesting.patch I sent earlier today.
> The conflict is only one line (the line with the NOT_IN_LOC use).
Stupid me. The reason for the conflict of course wasn't the rename, but
the addition of struct command_rec *thiscmd _close_to_ the renamed
define. The context diff therefore may show a mismatch when patched:
> @@ -1079,10 +1080,10 @@
> core_dir_config *conf;
> regex_t *r = NULL;
> const char *old_end_token;
> <--- here's where thiscmd was added.
>
> void *new_file_conf = create_per_dir_config (cmd->pool);
>
> - const char *err = check_cmd_context(cmd, NOT_IN_LIMIT | NOT_IN_LOC);
> + const char *err = check_cmd_context(cmd, NOT_IN_LIMIT | NOT_IN_LOCATION);
And later,
> - if (not) arg++;
> + if (not) arg++; /* cfg_getline() reduced multiple blanks to one */
this comment is bogus. There's no space near the '!' character which is
skipped here. (For other parts of the code, it IS essential that
cfg_getline() strips leading whitespace, but here, I was totally wrong...)
Patch Take 2 attached.
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