httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: set/unset Headers
Date Tue, 08 Oct 1996 05:35:46 GMT

+1 on adding TAKE23 to http_config.c.

	Brian

On Mon, 7 Oct 1996, Paul Sutton wrote:
> Because Header can take two _or_ three arguments, I've had to update
> http_config.[ch] to support a new TAKE23 mode. I'll append this patch
> below.
> 
> Paul
> UK Web Ltd
> 
> diff -c ../src/http_config.c ./http_config.c
> *** ../src/http_config.c	Mon Sep 23 09:21:03 1996
> --- ./http_config.c	Sun Oct  6 23:20:20 1996
> ***************
> *** 401,407 ****
> 
>   char *invoke_cmd(command_rec *cmd, cmd_parms *parms, void *mconfig, char *args)
>   {
> !     char *w, *w2, *errmsg;
> 
>       if ((parms->override & cmd->req_override) == 0)
>           return pstrcat (parms->pool, cmd->name, " not allowed here", NULL);
> --- 401,407 ----
> 
>   char *invoke_cmd(command_rec *cmd, cmd_parms *parms, void *mconfig, char *args)
>   {
> !     char *w, *w2, *w3, *errmsg;
> 
>       if ((parms->override & cmd->req_override) == 0)
>           return pstrcat (parms->pool, cmd->name, " not allowed here", NULL);
> ***************
> *** 439,444 ****
> --- 439,459 ----
>   			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
> 
>   	return (*cmd->func) (parms, mconfig, w, w2);
> +
> +     case TAKE23:
> +
> + 	w = getword_conf (parms->pool, &args);
> + 	w2 = getword_conf (parms->pool, &args);
> + 	if (*args)
> + 	  w3 = getword_conf (parms->pool, &args);
> + 	else
> + 	  w3 = NULL;
> +
> + 	if (*w == '\0' || *w2 == '\0' || *args != 0)
> + 	    return pstrcat (parms->pool, cmd->name, " takes three arguments",
> + 			    cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
> +
> + 	return (*cmd->func) (parms, mconfig, w, w2, w3);
> 
>       case ITERATE:
> 
> diff -c ../src/http_config.h ./http_config.h
> *** ../src/http_config.h	Thu Aug 22 08:36:46 1996
> --- ./http_config.h	Mon Oct  7 00:11:04 1996
> ***************
> *** 62,67 ****
> --- 62,68 ----
>     RAW_ARGS,			/* cmd_func parses command line itself */
>     TAKE1,			/* one argument only */
>     TAKE2,			/* two arguments only */
> +   TAKE23,			/* two or three arguments */
>     ITERATE,			/* one argument, occuring multiple times
>   				 * (e.g., IndexIgnore)
>   				 */
> 
> 
> 

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Mime
View raw message