Re: weird x-forward-for problem

From: Ulric Eriksson <ulric_at_siag.nu>
Date: Tue, 11 Dec 2007 10:21:47 +0100 (CET)

On Sun, 9 Dec 2007, Thomas Eckhardt wrote:

> Around a year ago I had the same problem and fixed it with a *ugly* but
> for me working modification in pen.c
>
> --- pen-0.17.0/pen.c 2005-12-30 11:10:04.000000000 +0100
> +++ pen-0.17.0-patched/pen.c 2006-09-29 03:51:56.000000000 +0200
> @@ -859,18 +803,24 @@
> if (debuglevel) debug("Looking for LFLF");
> q = strstr(b, "\n\n");
> }
> + if (!q) {
> + if (debuglevel) debug("Looking for ugly-terminate");
> + q = strstr(b, "\r\n");
> + }
> if (!q) return n; /* not a header */
> #if 0 /* how is that supposed to happen? */
> if (q >= b+n) return n; /* outside of buffer */
>
> Hope it helps.

That is an interesting hack. It means that the X-Forwarded-For
goes right after the GET or POST or HEAD line. The original code
puts the header after all the other headers.

Ulric
Received on Tue Dec 11 2007 - 10:21:48 CET

This archive was generated by hypermail 2.2.0 : Tue Dec 11 2007 - 10:21:51 CET