The following reply was made to PR mod_log-any/1645; it has been noted by GNATS.
From: Renaud Waldura <[EMAIL PROTECTED]>
To: Renaud Waldura <[EMAIL PROTECTED]>, 'Paul Sutton' <[EMAIL PROTECTED]>,
'Rodent of Unusual Size' <[EMAIL PROTECTED]>
Cc: 'Renaud Waldura' <[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>,
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
Subject: Re: mod_log-any/1645: Tabs in CustomLog format converted to space
s in log file
Date: Wed, 14 Jan 1998 09:57:47 -0800
> FYI, I just commented out the faulty part and it seems to be working
fine.
Not! (of course not...) I've found at least one problem, with the
"require" directive.
In the config file:
1) require <sp> group <ht> my-group
2) require <ht> group <sp> my-group
1) is broken, I don't know what the code for the require directive
understands, but obvisouly not the Right Thing. The group authentication
doesn't work at all. No error message though.
2) works fine.
I'm afraid this particular problem might happen here and there over and
over again. So my patch is wrong, and we're back to step 1: a real patch
is needed.
--Renaud
> -----Original Message-----
> From: Renaud Waldura
> Sent: Tuesday, January 13, 1998 9:48 AM
> To: 'Paul Sutton'; Rodent of Unusual Size
> Cc: Renaud Waldura; '[EMAIL PROTECTED]'; [EMAIL PROTECTED];
> [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: mod_log-any/1645: Tabs in CustomLog format converted
> to space s in log file
>
>
> FYI, I just commented out the faulty part and it seems to be working
> fine. AFAIK of course.
>
>
> [util.c lines 565-571]
>
> int
> cfg_getline(char *s, int n, FILE *f) {
> register int i=0, c;
>
> s[0] = '\0';
> /* skip leading whitespace */
> do {
> c = getc(f);
> } while (c == '\t' || c == ' ');
>
> if(c == EOF)
> return 1;
>
> while(1) {
> /***
> if((c == '\t') || (c == ' ')) {
> s[i++] = ' ';
> while((c == '\t') || (c == ' '))
> c = getc(f);
> }
> ***/
> if(c == CR) {
> c = getc(f);
> }
> if(c == EOF || c == 0x4 || c == LF || i == (n-1)) {
> /* blast trailing whitespace */
> while(i && (s[i-1] == ' ')) --i;
> s[i] = '\0';
> return 0;
> }
> s[i] = c;
> ++i;
> c = getc(f);
> }
> }
>
>
> I also believe that skipping the leading and trailing whitespace in
> this routine is useless, since, from what I've read, all code after
> the initial cfg_getline() in srm_command_loop() calls getword_conf(),
> which skips whitespace while respecting quotes.
>
> IMHO, cfg_getline() should be rewritten to something just reading the
> stream f and copying the resulting line to s.
>
> --Renaud
>