The fix for bug 50496 [1] (response sizes in access log valve ignored
compression) was implemented by forcing the response to be flushed all
the way to the socket so the access log valve can get an accurate byte
count from the connector.

This has a number of consequences:
- chunked encoding will always be used for HTTP/1.1 requests
- the access log valve commits the response

These consequences have triggered a couple a bugzilla reports [2], [3]

While contemplating access logging it is also worth considering:
- additional enhancement requests - [4], [5]
- Tomcat and httpd support slightly different options for log patterns
- httpd logs the time the request was received, Tomact logs the time the
access log entry was written (this is a pain when trying to compare
httpd and Tomcat logs to diagnose proxy issues)
- the fixes to log 400 and other errors were relatively involved
- the access log ignores processing time before the request enters the
valve and after it leaves it


I can see a couple of ways forward:
a) provide minimal configuration changes (probably to control how bytes
are calculated) to address [2] & [3]
b) All of a) plus further changes to align Tomcat with httpd where possible
c) Refactor the access logging. I don't have a clear picture of what
this might look like but I am thinking along the lines of:
 - log to JULI rather than manage files in the access log
 - most of the code moves to the connector and gets triggered as part of
finishing the response
 - access log valves register their desired log format etc with the
connector code when they start
 - the access log valves add a marker to the request/response indicating
that it should be logged to their log file


Given that 7.0.6 is now stable, I think c) is probably too big a change
for 7.0.x but I do think that is the direction it needs to head.

For 7.0.x, I think b) is probably the way to go along with some
additional documentation that explains the implications of each of the
configuration options from a).

Thoughts?

Mark


[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=50496
[2] https://issues.apache.org/bugzilla/show_bug.cgi?id=50582
[3] https://issues.apache.org/bugzilla/show_bug.cgi?id=50583
[4] https://issues.apache.org/bugzilla/show_bug.cgi?id=46252
[5] https://issues.apache.org/bugzilla/show_bug.cgi?id=49165

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to