* [EMAIL PROTECTED] wrote:
> /* e is the first _invalid_ location in q
> N.B. returns the terminating NUL.
> */
> static char *log_escape(char *q, const char *e, const char *p)
> {
> for ( ; *p ; ++p) {
> assert(q < e);
> if (*p < ' ' || *p >= 0x7f || *p == '|' || *p == ':' || *p == '%')
> {
> assert(q+2 < e);
> *q++ = '%';
> sprintf(q, "%02x", *(unsigned char *)p);
> q += 2;
> }
> else
> *q++ = *p;
> }
> assert(q < e);
> *q = '\0';
>
> return q;
> }
This function is not EBCDIC safe. I'd suggest to use one of the escaping
functions in server/util.c.
Additionally please use ap_assert, which logs before dumping. (applies to
other occurences as well).
nd