On Sat, 2002-09-07 at 19:02, PsychoTekk .de wrote:
> hi Henrik,
> somewhere in the last 3 lines there must be a mistake,
> squid compiles fine (except for the memBufClear() call which
> is not defined) but as soon as errorDump() is processed
> squid doesn't work properly anymore...
> regards,
> Clemens
>
> + static int
> + errorDump(ErrorState *err, MemBuf *mb)
> + {
> + request_t *r = err->request;
delete this:
> + MemBuf str = MemBufNULL;
You DONT NEED the local membuf. I've said this before in this thread.
> + const char *p = NULL; /* takes priority over mb if set */
> + /* email subject line */
delete this:
> + memBufPrintf(mb, "%s", );
keep this:
> + memBufPrintf(mb, "?subject=CacheErrorInfo - %s", rfc1738_escape(errorPageName(err->type)));
delete this:
> + memBufReset(&str);
Rob
Oh, and BTW: it's actually valid to use ' ' in the URL reference given
the browser as long as it's quoted (ie a href="foo bar.html") - it's up
to the browser to escape it when it makes the request.
Anything we don't -control- must be escaped to prevent embedded script
attacks.
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:27 MST