You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2010/02/27 19:43:16 UTC
svn commit: r917009 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
docs/manual/mod/mod_log_config.xml modules/loggers/mod_log_config.c
Author: minfrin
Date: Sat Feb 27 18:43:16 2010
New Revision: 917009
URL: http://svn.apache.org/viewvc?rev=917009&view=rev
Log:
Backport:
mod_log_config: Add the R option to log the handler used within the
request.
Submitted by: Christian Folini <christian.folini netnea com>
+1: minfrin, jim, rpluem
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/docs/manual/mod/mod_log_config.xml
httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=917009&r1=917008&r2=917009&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sat Feb 27 18:43:16 2010
@@ -9,6 +9,9 @@
access control is still vulnerable, unless using OpenSSL >= 0.9.8l.
[Joe Orton, Ruediger Pluem, Hartmut Keil <Hartmut.Keil adnovum.ch>]
+ *) mod_log_config: Add the R option to log the handler used within the
+ request. [Christian Folini <christian.folini netnea com>]
+
*) Allow fine control over the removal of Last-Modified and ETag headers
within the INCLUDES filter, making it possible to cache responses if
desired. Fix the default value of the SSIAccessEnable directive.
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=917009&r1=917008&r2=917009&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sat Feb 27 18:43:16 2010
@@ -87,13 +87,6 @@
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_log_config: Add the R option to log the handler used within the
- request.
- Submitted by: Christian Folini <christian.folini netnea com>
- Trunk patch: http://svn.apache.org/viewvc?rev=905420&view=rev
- Trunk works for 2.2.x
- +1: minfrin, jim, rpluem
-
* mod_proxy_http: Make sure that when an ErrorDocument is served
from a reverse proxied URL, that the subrequest respects the status
of the original request. This brings the behaviour of proxy_handler
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_log_config.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_log_config.xml?rev=917009&r1=917008&r2=917009&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_log_config.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_log_config.xml Sat Feb 27 18:43:16 2010
@@ -159,6 +159,9 @@
<tr><td><code>%r</code></td>
<td>First line of request</td></tr>
+ <tr><td><code>%R</code></td>
+ <td>The handler generating the response (if any).</td></tr>
+
<tr><td><code>%s</code></td>
<td>Status. For requests that got internally redirected, this is
the status of the *original* request --- <code>%>s</code>
@@ -267,6 +270,11 @@
format provided by <module>mod_logio</module> will log the
actual number of bytes sent over the network.</p>
+ <p>Note: <module>mod_cache</module> is implemented as a
+ quick-handler and not as a standard handler. Therefore, the
+ <code>%R</code> format string will not return any handler
+ information when content caching is involved.</p>
+
</section>
<section id="examples"><title>Examples</title>
Modified: httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.c?rev=917009&r1=917008&r2=917009&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/branches/2.2.x/modules/loggers/mod_log_config.c Sat Feb 27 18:43:16 2010
@@ -381,6 +381,11 @@
return pfmt(r->pool, r->status);
}
+static const char *log_handler(request_rec *r, char *a)
+{
+ return ap_escape_logitem(r->pool, r->handler);
+}
+
static const char *clf_log_bytes_sent(request_rec *r, char *a)
{
if (!r->sent_bodyct || !r->bytes_sent) {
@@ -1516,6 +1521,7 @@
log_pfn_register(p, "T", log_request_duration, 1);
log_pfn_register(p, "U", log_request_uri, 1);
log_pfn_register(p, "s", log_status, 1);
+ log_pfn_register(p, "R", log_handler, 1);
}
return OK;