/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-06 / X-Forwarded-For header

[ << ] [ >> ]

[ Pound, OWA 2003, SSL and forms-based ... ] [ detecting state of backends / James Billson ... ]

X-Forwarded-For header
"Dean" <deanmaunder(at)telstra.com>
2005-06-29 00:52:17 [ FULL ]
Hi,
Having a slight problem with pound adding X-Forwarded-For headers to my
apache logs.  Im not sure if this is an issue with the 1.8.3 version, as we
havent had problems with this before, and we recently upgraded from 1.6.
Whats happening is the X-Forwarded-For that is being added has a space in it
eg:
unknown, 203.143.xxx.xxx 192.168.xxx.xx [12/May/2005:09:20:34 +1000] "GET
/logout.php HTTP/1.0" 302 296 " <http://mydomain.com/> http://mydomain.com/"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
Seeing as I have a logformat of:
LogFormat "%{X-Forwarded-For}i %A %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
The space after the comma in the X-Forwarded-For is causing awstats to fail.
Can anyone offer a way around this?
Im running pound on Fedora Core3
Other than that, we have been using pound for over a year with no problems,
and have found it to be an extreemly useful and reliable piece of
software...great work!

Dean.
Attachments:  
text.html text/html 2281 Bytes

Re: [Pound Mailing List] X-Forwarded-For header
Sascha Ottolski <sascha.ottolski(at)gallileus.de>
2005-06-29 11:36:02 [ FULL ]
Am Mittwoch, 29. Juni 2005 00:52 schrieb Dean:[...]

just a guess, but it might help to let your log format put quotation marks 
(quoted as \", I'd think) around the x-forwarded-for?

May be something like
LogFormat "\"%{X-Forwarded-For}i\" %A %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined

If I'm right, you might need to change the way awstats interprets the log in 
the same manner.

Cheers, Sascha

MailBoxer