svn commit: r1935817 - in httpd/httpd/branches/2.4.x: . modules/cache modules/filters modules/http2 modules/loggers modules/mappers modules/md modules/proxy modules/ssl server
[email protected] Thu, 02 Jul 2026 19:54:31 -0000
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178302207112.3844496.10244517227301347547@svn03-he-fi> |
Author: jim
Date: Thu Jul 2 19:54:30 2026
New Revision: 1935817
Log:
*) Constify static arrays of string constants.
trunk patch: https://svn.apache.org/r1933659
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c
httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
httpd/httpd/branches/2.4.x/modules/http2/h2_protocol.c
httpd/httpd/branches/2.4.x/modules/http2/h2_proxy_session.c
httpd/httpd/branches/2.4.x/modules/http2/h2_session.c
httpd/httpd/branches/2.4.x/modules/loggers/mod_logio.c
httpd/httpd/branches/2.4.x/modules/mappers/mod_speling.c
httpd/httpd/branches/2.4.x/modules/md/md_log.c
httpd/httpd/branches/2.4.x/modules/md/md_store.c
httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c
httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c
httpd/httpd/branches/2.4.x/server/protocol.c
Modified: httpd/httpd/branches/2.4.x/STATUS
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/STATUS Thu Jul 2 19:54:30 2026 (r1935817)
@@ -163,11 +163,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Constify static arrays of string constants.
- trunk patch: https://svn.apache.org/r1933659
- 2.4.x patch: svn merge -c 1933659 ^/httpd/httpd/trunk .
- +1: rjung, jorton, jim
-
*) include/httpd.h: Define HTTP_EARLY_HINTS (103) per RFC 8297.
modules/http/http_protocol.c (status_lines): Add 103 response.
Needed by backport 1934913 below.
Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -39,7 +39,7 @@ static ap_filter_rec_t *cache_invalidate
/**
* Entity headers' names
*/
-static const char *MOD_CACHE_ENTITY_HEADERS[] = {
+static const char *const MOD_CACHE_ENTITY_HEADERS[] = {
"Allow",
"Content-Encoding",
"Content-Language",
@@ -819,7 +819,7 @@ static apr_status_t cache_save_filter(ap
apr_time_t exp, date, lastmod, now;
apr_off_t size = -1;
cache_info *info = NULL;
- const char *reason, **eh;
+ const char *reason, *const *eh;
apr_pool_t *p;
apr_bucket *e;
apr_table_t *headers;
Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -1304,7 +1304,7 @@ static void proxy_html_insert(request_re
}
static void proxy_html_hooks(apr_pool_t *p)
{
- static const char *aszSucc[] = { "mod_filter.c", NULL };
+ static const char *const aszSucc[] = { "mod_filter.c", NULL };
ap_register_output_filter_protocol("proxy-html", proxy_html_filter,
NULL, AP_FTYPE_RESOURCE,
AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH);
Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_protocol.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_protocol.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_protocol.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -58,7 +58,7 @@ const char *H2_MAGIC_TOKEN = "PRI * HTTP
/*******************************************************************************
* HTTP/2 error stuff
*/
-static const char *h2_err_descr[] = {
+static const char *const h2_err_descr[] = {
"no error", /* 0x0 */
"protocol error",
"internal error",
@@ -91,7 +91,7 @@ const char *h2_protocol_err_description(
* Black Listed Ciphers from RFC 7549 Appendix A
*
*/
-static const char *RFC7540_names[] = {
+static const char *const RFC7540_names[] = {
/* ciphers with NULL encrpytion */
"NULL-MD5", /* TLS_NULL_WITH_NULL_NULL */
/* same */ /* TLS_RSA_WITH_NULL_MD5 */
Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_proxy_session.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_proxy_session.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_proxy_session.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -1188,7 +1188,7 @@ static apr_status_t session_shutdown(h2_
}
-static const char *StateNames[] = {
+static const char *const StateNames[] = {
"INIT", /* H2_PROXYS_ST_INIT */
"DONE", /* H2_PROXYS_ST_DONE */
"IDLE", /* H2_PROXYS_ST_IDLE */
Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_session.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_session.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_session.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -1416,7 +1416,7 @@ static void on_stream_output(void *ctx,
}
-static const char *StateNames[] = {
+static const char *const StateNames[] = {
"INIT", /* H2_SESSION_ST_INIT */
"DONE", /* H2_SESSION_ST_DONE */
"IDLE", /* H2_SESSION_ST_IDLE */
Modified: httpd/httpd/branches/2.4.x/modules/loggers/mod_logio.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/loggers/mod_logio.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/loggers/mod_logio.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -254,7 +254,7 @@ static const command_rec logio_cmds[] =
static void register_hooks(apr_pool_t *p)
{
- static const char *pre[] = { "mod_log_config.c", NULL };
+ static const char *const pre[] = { "mod_log_config.c", NULL };
ap_hook_pre_connection(logio_pre_conn, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_pre_config(logio_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_speling.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_speling.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_speling.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -125,7 +125,7 @@ typedef enum {
SP_VERYDIFFERENT = 6
} sp_reason;
-static const char *sp_reason_str[] =
+static const char *const sp_reason_str[] =
{
"identical",
"miscapitalized",
Modified: httpd/httpd/branches/2.4.x/modules/md/md_log.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_log.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/md/md_log.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -22,7 +22,7 @@
#define LOG_BUFFER_LEN 1024
-static const char *level_names[] = {
+static const char *const level_names[] = {
"emergency",
"alert",
"crit",
Modified: httpd/httpd/branches/2.4.x/modules/md/md_store.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/md_store.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/md/md_store.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -47,7 +47,7 @@
#define GNAME_STAGING
#define GNAME_ARCHIVE
-static const char *GROUP_NAME[] = {
+static const char *const GROUP_NAME[] = {
"none",
"accounts",
"challenges",
Modified: httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/proxy/ajp_header.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -21,7 +21,7 @@
APLOG_USE_MODULE(proxy_ajp);
-static const char *response_trans_headers[] = {
+static const char *const response_trans_headers[] = {
"Content-Type",
"Content-Language",
"Content-Length",
Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -772,7 +772,7 @@ static request_rec *make_fake_req(conn_r
static void process_proxy_header(request_rec *r, proxy_dir_conf *c,
const char *key, const char *value)
{
- static const char *date_hdrs[]
+ static const char *const date_hdrs[]
= { "Date", "Expires", "Last-Modified", NULL };
static const struct {
const char *name;
@@ -1038,7 +1038,7 @@ int ap_proxy_http_process_response(proxy
int pread_len = 0;
apr_table_t *save_table;
int backend_broke = 0;
- static const char *hop_by_hop_hdrs[] =
+ static const char *const hop_by_hop_hdrs[] =
{"Keep-Alive", "Proxy-Authenticate", "TE", "Trailer", "Upgrade", NULL};
int i;
const char *te = NULL;
Modified: httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/modules/ssl/mod_ssl.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -714,12 +714,12 @@ static void ssl_register_hooks(apr_pool_
{
/* ssl_hook_ReadReq needs to use the BrowserMatch settings so must
* run after mod_setenvif's post_read_request hook. */
- static const char *pre_prr[] = { "mod_setenvif.c", NULL };
+ static const char *const pre_prr[] = { "mod_setenvif.c", NULL };
/* The ssl_init_Module post_config hook should run before mod_proxy's
* for the ssl proxy main configs to be merged with vhosts' before being
* themselves merged with mod_proxy's in proxy_hook_section_post_config.
*/
- static const char *b_pc[] = { "mod_proxy.c", NULL};
+ static const char *const b_pc[] = { "mod_proxy.c", NULL};
ssl_io_filter_register(p);
Modified: httpd/httpd/branches/2.4.x/server/protocol.c
==============================================================================
--- httpd/httpd/branches/2.4.x/server/protocol.c Thu Jul 2 19:53:40 2026 (r1935816)
+++ httpd/httpd/branches/2.4.x/server/protocol.c Thu Jul 2 19:54:30 2026 (r1935817)
@@ -76,7 +76,7 @@ AP_DECLARE_DATA ap_filter_rec_t *ap_old_
/* Patterns to match in ap_make_content_type() */
-static const char *needcset[] = {
+static const char *const needcset[] = {
"text/plain",
"text/html",
NULL