*) Easy patches: synch 2.4.x and trunk
- core: constify pointers in ap_expr lookup tables. ~1/2Kb moves to r/o text section
- core: Optimize performance in ap_normalize_path()
- core: Optimize code flow in log_backtrace()
- Fix a typo in README.cmake
- Add a missing 'be' in README.CHANGES
trunk patch:
https://svn.apache.org/r1877350
https://svn.apache.org/r1894021
https://svn.apache.org/r1906379
https://svn.apache.org/r1908657
https://svn.apache.org/r1908150
2.4.x patch: svn merge -c
1877350,
1894021,
1906379,
1908657,
1908150 ^/httpd/httpd/trunk .
+1: jailletc36, rpluem, gbechis
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1911073 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.4.58
+ *) Easy patches: synch 2.4.x and trunk
+ - core: constify pointers in ap_expr lookup tables.
+ ~1/2Kb moves to r/o text section
+ - core: Optimize performance in ap_normalize_path()
+ - core: Optimize code flow in log_backtrace()
+ - Fix a typo in README.cmake
+ - Add a missing 'be' in README.CHANGES
+ [Christophe Jaillet]
+
Changes with Apache 2.4.57
*) mod_proxy: Check before forwarding that a nocanon path has not been
This make target can be seen in a similar way as the scripts to update the
documentation files from its xml sources. It can be executed immediately
after the new file in the changes-entries directory has been created / merged
-and committed or it can executed later. It should be executed at least before
+and committed or it can be executed later. It should be executed at least before
a release gets tagged.
included if it is present.
-DNGHTTP2_INCLUDE_DIR=d:/path/to/nghttp2inst/include (which has nghttp2/*.h)
- -DNGHTTP2_LIBRARIES=d:/path/to/nghttp2inst/lib/nghttp2.lib"
+ -DNGHTTP2_LIBRARIES="d:/path/to/nghttp2inst/lib/nghttp2.lib"
These will have to be specified if nghttp2 was installed to a different
directory than httpd.
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Easy patches: synch 2.4.x and trunk
- - core: constify pointers in ap_expr lookup tables. ~1/2Kb moves to r/o text section
- - core: Optimize performance in ap_normalize_path()
- - core: Optimize code flow in log_backtrace()
- - Fix a typo in README.cmake
- - Add a missing 'be' in README.CHANGES
- trunk patch:
- https://svn.apache.org/r1877350
- https://svn.apache.org/r1894021
- https://svn.apache.org/r1906379
- https://svn.apache.org/r1908657
- https://svn.apache.org/r1908150
- 2.4.x patch: svn merge -c 1877350,1894021,1906379,1908657,1908150 ^/httpd/httpd/trunk .
- +1: jailletc36, rpluem, gbechis
-
*) core: Optimize send_brigade_nonblocking()
trunk patch:
https://svn.apache.org/r1892450
static void log_backtrace(const request_rec *r)
{
- const request_rec *top = r;
-
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00121)
- "r->uri = %s", r->uri ? r->uri : "(unexpectedly NULL)");
-
- while (top && (top->prev || top->main)) {
- if (top->prev) {
- top = top->prev;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00122)
- "redirected from r->uri = %s",
- top->uri ? top->uri : "(unexpectedly NULL)");
- }
+ if (APLOGrdebug(r)) {
+ const request_rec *top = r;
+
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00121)
+ "r->uri = %s", r->uri ? r->uri : "(unexpectedly NULL)");
+
+ while (top && (top->prev || top->main)) {
+ if (top->prev) {
+ top = top->prev;
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00122)
+ "redirected from r->uri = %s",
+ top->uri ? top->uri : "(unexpectedly NULL)");
+ }
- if (!top->prev && top->main) {
- top = top->main;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00123)
- "subrequested from r->uri = %s",
- top->uri ? top->uri : "(unexpectedly NULL)");
+ if (!top->prev && top->main) {
+ top = top->main;
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00123)
+ "subrequested from r->uri = %s",
+ top->uri ? top->uri : "(unexpectedly NULL)");
+ }
}
}
}
int ret = 1;
apr_size_t l = 1, w = 1, n;
int decode_unreserved = (flags & AP_NORMALIZE_DECODE_UNRESERVED) != 0;
+ int merge_slashes = (flags & AP_NORMALIZE_MERGE_SLASHES) != 0;
if (!IS_SLASH(path[0])) {
/* Besides "OPTIONS *", a request-target should start with '/'
if (w == 0 || IS_SLASH(path[w - 1])) {
/* Collapse ///// sequences to / */
- if ((flags & AP_NORMALIZE_MERGE_SLASHES) && IS_SLASH(path[l])) {
+ if (merge_slashes && IS_SLASH(path[l])) {
do {
l++;
} while (IS_SLASH(path[l]));
APR_DECLARE_OPTIONAL_FN(int, http2_is_h2, (conn_rec *));
static APR_OPTIONAL_FN_TYPE(http2_is_h2) *is_http2 = NULL;
-static const char *conn_var_names[] = {
+static const char *const conn_var_names[] = {
"HTTPS", /* 0 */
"IPV6", /* 1 */
"CONN_LOG_ID", /* 2 */
}
}
-static const char *request_var_names[] = {
+static const char *const request_var_names[] = {
"REQUEST_METHOD", /* 0 */
"REQUEST_SCHEME", /* 1 */
"REQUEST_URI", /* 2 */
}
}
-static const char *req_header_var_names[] = {
+static const char *const req_header_var_names[] = {
"HTTP_USER_AGENT", /* 0 */
"HTTP_PROXY_CONNECTION", /* 1 */
"HTTP_REFERER", /* 2 */
NULL
};
-static const char *req_header_header_names[] = {
+static const char *const req_header_header_names[] = {
"User-Agent",
"Proxy-Connection",
"Referer",
static const char *req_header_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
{
- const char **varname = (const char **)data;
+ const char **const varname = (const char **)data;
int index = (varname - req_header_var_names);
const char *name;
return apr_table_get(ctx->r->headers_in, name);
}
-static const char *misc_var_names[] = {
+static const char *const misc_var_names[] = {
"TIME_YEAR", /* 0 */
"TIME_MON", /* 1 */
"TIME_DAY", /* 2 */
struct expr_provider_multi {
const void *func;
- const char **names;
+ const char *const *names;
};
static const struct expr_provider_multi var_providers[] = {
case AP_EXPR_FUNC_VAR: {
const struct expr_provider_multi *prov = var_providers;
while (prov->func) {
- const char **name = prov->names;
+ const char *const *name = prov->names;
while (*name) {
if (ap_cstr_casecmp(*name, parms->name) == 0) {
*parms->func = prov->func;