diff options
author | Stefan Bühler <stbuehler@web.de> | 2015-07-05 16:48:27 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2015-07-05 16:48:27 +0000 |
commit | 71b5c53a0a77e6f9d1b5730a3b025b9c00016a67 (patch) | |
tree | 3770bbfa0100a27ade3ef6c9fe1c14bc1b256e13 | |
parent | 572681c9f1bc2a11c84d6a6a3b2ad7e52bcdcc8b (diff) | |
download | lighttpd-git-71b5c53a0a77e6f9d1b5730a3b025b9c00016a67.tar.gz |
show extforward re-run warning only with debug.log-request-handling (fixes #2561)
From: Stefan Bühler <stbuehler@web.de>
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2993 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/mod_extforward.c | 8 |
2 files changed, 6 insertions, 3 deletions
@@ -21,6 +21,7 @@ NEWS * fix segfaults in many plugins if they failed configuration * escape all strings for logging (fixes #2646 log file injection, reported by Jaanus Kääp) * fix hex escape in accesslog (fixes #2559) + * show extforward re-run warning only with debug.log-request-handling (fixes #2561) - 1.4.35 - 2014-03-12 * [network/ssl] fix build error if TLSEXT is disabled diff --git a/src/mod_extforward.c b/src/mod_extforward.c index 557c5051..25dde926 100644 --- a/src/mod_extforward.c +++ b/src/mod_extforward.c @@ -445,8 +445,10 @@ URIHANDLER_FUNC(mod_extforward_uri_handler) { if (sock.plain.sa_family != AF_UNSPEC) { /* we found the remote address, modify current connection and save the old address */ if (con->plugin_ctx[p->id]) { - log_error_write(srv, __FILE__, __LINE__, "s", - "patching an already patched connection!"); + if (con->conf.log_request_handling) { + log_error_write(srv, __FILE__, __LINE__, "s", + "-- mod_extforward_uri_handler already patched this connection, resetting state"); + } handler_ctx_free(con->plugin_ctx[p->id]); con->plugin_ctx[p->id] = NULL; } @@ -456,7 +458,7 @@ URIHANDLER_FUNC(mod_extforward_uri_handler) { con->dst_addr = sock; con->dst_addr_buf = buffer_init(); buffer_copy_string(con->dst_addr_buf, real_remote_addr); - + if (con->conf.log_request_handling) { log_error_write(srv, __FILE__, __LINE__, "ss", "patching con->dst_addr_buf for the accesslog:", real_remote_addr); |