[Twisted-Python] HTTP combined log format in twisted.web.http changed from 13.2.0 to 14.0.0

Free Ekanayaka free at 64studio.com
Tue Nov 25 08:26:41 MST 2014


Hi,

it was

            line = '%s - - %s "%s" %d %s "%s" "%s"\n' % (

in 13.2.0 (twisted/web/http.py line 1920), and it's

        u'"%(ip)s" - - %(timestamp)s "%(method)s %(uri)s %(protocol)s" '

so basically the client IP now gets wrapped within double quotes, e.g. a
log line that was looking like:

1.2.3.4 - - [25/Oct/2004:12:31:59 +0000] "GET /dummy HTTP/1.0" 123 - "-" "-"

it now looks like:

"1.2.3.4" - - [25/Oct/2004:12:31:59 +0000] "GET /dummy HTTP/1.0" 123 - "-"
"-"

as one can see in the unit tests in test_web.py too.

What's the reason for this change?

It feels it can potentially break code that parses log files and it also
seems to diverge from the format described on the Apache web site:

http://httpd.apache.org/docs/1.3/logs.html

Cheers,

Free
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20141125/ac59cdd3/attachment.html>


More information about the Twisted-Python mailing list