Le 01/08/2018 à 13:27, [email protected] a écrit :
Author: jim
Date: Wed Aug 1 11:27:28 2018
New Revision: 1837225
URL: http://svn.apache.org/viewvc?rev=1837225&view=rev
Log:
Fix PR54848 in a 2.4.x backportable format. Ideally deprecating the use
of ->client in whatever version of 2.4 this is added into would be
more logical.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/include/scoreboard.h
httpd/httpd/trunk/modules/echo/mod_echo.c
httpd/httpd/trunk/modules/experimental/mod_noloris.c
httpd/httpd/trunk/modules/generators/mod_status.c
httpd/httpd/trunk/modules/lua/lua_request.c
httpd/httpd/trunk/server/scoreboard.c
Shouldn't we MODULE_MAGIC_NUMBER_MINOR++ for the below struct change?
Modified: httpd/httpd/trunk/CHANGES
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1837225&r1=1837224&r2=1837225&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 1 11:27:28 2018
@@ -551,7 +551,9 @@ Changes with Apache 2.5.0-alpha
*) mod_status, mod_echo: Fix the display of client addresses.
They were truncated to 31 characters which is not enough for IPv6
addresses.
- PR 54848 [Bernhard Schmidt <berni birkenwald de>]
+ This is done by deprecating the use of the 'client' field and using
+ the new 'client64' field in worker_score.
+ PR 54848 [Bernhard Schmidt <berni birkenwald de>, Jim Jagielski]
*) core: merge AllowEncodedSlashes from the base configuration into
virtual hosts. [Eric Covener]
Modified: httpd/httpd/trunk/include/scoreboard.h
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/include/scoreboard.h?rev=1837225&r1=1837224&r2=1837225&view=diff
==============================================================================
--- httpd/httpd/trunk/include/scoreboard.h (original)
+++ httpd/httpd/trunk/include/scoreboard.h Wed Aug 1 11:27:28 2018
@@ -112,10 +112,11 @@ struct worker_score {
#ifdef HAVE_TIMES
struct tms times;
#endif
- char client[40]; /* Keep 'em small... but large enough to hold
an IPv6 address */
+ char client[32]; /* DEPRECATED: Keep 'em small... */
char request[64]; /* We just want an idea... */
char vhost[32]; /* What virtual host is being accessed? */
char protocol[16]; /* What protocol is used on the connection? */
+ char client64[64];
};
typedef struct {
Modified: httpd/httpd/trunk/modules/echo/mod_echo.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/echo/mod_echo.c?rev=1837225&r1=1837224&r2=1837225&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/echo/mod_echo.c (original)
+++ httpd/httpd/trunk/modules/echo/mod_echo.c Wed Aug 1 11:27:28 2018
@@ -108,10 +108,10 @@ static int update_echo_child_status(ap_s
/* initial pass only, please - in the name of efficiency */
if (c) {
- apr_cpystrn(ws->client,
+ apr_cpystrn(ws->client64,
ap_get_remote_host(c, c->base_server->lookup_defaults,
REMOTE_NOLOOKUP, NULL),
- sizeof(ws->client));
+ sizeof(ws->client64));
apr_cpystrn(ws->vhost, c->base_server->server_hostname,
sizeof(ws->vhost));
/* Deliberate trailing space - filling in string on WRITE passes */
Shouldn't we update both client and client64 here, as done below in
'update_child_status_internal()' ?
CJ