Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 18536 invoked by uid 500); 7 Dec 2000 13:17:20 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 18455 invoked from network); 7 Dec 2000 13:17:17 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Thu, 7 Dec 2000 05:19:57 -0800 From: Greg Stein To: new-httpd@apache.org Subject: Re: [PATCH] Re: mod_log_config: Cookie logging patch 1.3.X Message-ID: <20001207051957.Q27235@lyra.org> Mail-Followup-To: new-httpd@apache.org References: <20001207104538.D22151@linuxcare.com.au> <20001207115258.E22151@linuxcare.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20001207115258.E22151@linuxcare.com.au>; from mbp@linuxcare.com.au on Thu, Dec 07, 2000 at 11:52:58AM +1100 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N -0 on this patch -1 (veto) on the ap_get_token() changes. The modified code stops on characters other than "," and ";" (change of behavior). Cheers, -g On Thu, Dec 07, 2000 at 11:52:58AM +1100, Martin Pool wrote: >... > /* Retrieve a token, spacing over it and returning a pointer to > * the first non-white byte afterwards. Note that these tokens > * are delimited by semis and commas; and can also be delimited > * by whitespace at the caller's option. > - */ > - > + * > + * Strictly, HTTP tokens cannot be quoted or contain whitespace. But > + * accepting this makes us more forgiving in what we accept, and > + * allows this function also to be used to read quoted strings. */ > API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_ > white) > { > const char *ptr = *accept_line; > @@ -1368,12 +1418,17 @@ > * (comments are already gone). > */ > > - while (*ptr && (accept_white || !ap_isspace(*ptr)) > - && *ptr != ';' && *ptr != ',') { > - if (*ptr++ == '"') > + while (*ptr) { > + if (*ptr++ == '"') { > while (*ptr) > if (*ptr++ == '"') > break; > + } else if (accept_white && ap_isspace(*ptr)) { > + /* not stricly part of a token, but the caller wants to accept it a > nyhow */ > + ; > + } else if (TEST_CHAR(*ptr, T_HTTP_TOKEN_STOP)) { > + break; > + } > } >... -- Greg Stein, http://www.lyra.org/