Commit bb16e47d authored by Yoshinori Okuji's avatar Yoshinori Okuji

One more patch: quote the request when logging. This is more compatible with apache.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22622 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a46b931a
......@@ -25,6 +25,7 @@ from ZPublisher.HTTPRequest import trusted_proxies
import string
import base64
import time
from urllib import quote
def log (self, bytes):
# The purpose of this patch is to emit original IP addresses in Z2.log
......@@ -63,7 +64,12 @@ def log (self, bytes):
'- %s [%s] "%s" %d %d "%s" "%s"\n' % (
name,
self.log_date_string (time.time()),
self.request,
# Originally, an unquoted request string was logged, but
# it only confuses log analysis programs! Note that Apache
# HTTP Server never unquote URIs in the access log.
# <patch>
quote(self.request),
# </patch>
self.reply_code,
bytes,
referer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment