From: Stefan Eissing Date: Tue, 14 Dec 2021 09:58:22 +0000 (+0000) Subject: Merge r1889494,r1892563,r1892917 from trunk: X-Git-Tag: candidate-2.4.52-rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbda64f2f31d69f5e6459099d209b3ca2a8d53b2;p=thirdparty%2Fapache%2Fhttpd.git Merge r1889494,r1892563,r1892917 from trunk: - mod_proxy_balancer: add missing spaces in HTML output - mod_proxy_http: Avoid a double call to apr_table_get() - mod_ssl: Fix some typo and doxygen issues [Jean-Frederic Clere] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895943 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_ssl.h b/include/http_ssl.h index 0b5379379fd..e9fb0efd56a 100644 --- a/include/http_ssl.h +++ b/include/http_ssl.h @@ -124,8 +124,8 @@ AP_DECLARE(const char *) ap_ssl_var_lookup(apr_pool_t *p, server_rec *s, * * @param s the server certificates are collected for * @param p the pool to use for allocations - * @param cert_file and array of const char* with the path to the certificate chain - * @param key_file and array of const char* with the path to the private key file + * @param cert_files an array of const char* with the path to the certificate chain + * @param key_files an array of const char* with the path to the private key file * @return OK if files were added, DECLINED if not, or other for error. */ @@ -141,8 +141,8 @@ AP_DECLARE_HOOK(int, ssl_add_cert_files, (server_rec *s, apr_pool_t *p, * * @param s the server certificates are collected for * @param p the pool to use for allocations - * @param cert_file and array of const char* with the path to the certificate chain - * @param key_file and array of const char* with the path to the private key file + * @param cert_files an array of const char* with the path to the certificate chain + * @param key_files an array of const char* with the path to the private key file */ AP_DECLARE(apr_status_t) ap_ssl_add_cert_files(server_rec *s, apr_pool_t *p, apr_array_header_t *cert_files, @@ -156,8 +156,8 @@ AP_DECLARE(apr_status_t) ap_ssl_add_cert_files(server_rec *s, apr_pool_t *p, * * @param s the server certificates are collected for * @param p the pool to use for allocations - * @param cert_file and array of const char* with the path to the certificate chain - * @param key_file and array of const char* with the path to the private key file + * @param cert_files an array of const char* with the path to the certificate chain + * @param key_files an array of const char* with the path to the private key file * @return OK if files were added, DECLINED if not, or other for error. */ AP_DECLARE_HOOK(int, ssl_add_fallback_cert_files, (server_rec *s, apr_pool_t *p, @@ -174,8 +174,8 @@ AP_DECLARE_HOOK(int, ssl_add_fallback_cert_files, (server_rec *s, apr_pool_t *p, * * @param s the server certificates are collected for * @param p the pool to use for allocations - * @param cert_file and array of const char* with the path to the certificate chain - * @param key_file and array of const char* with the path to the private key file + * @param cert_files an array of const char* with the path to the certificate chain + * @param key_files an array of const char* with the path to the private key file */ AP_DECLARE(apr_status_t) ap_ssl_add_fallback_cert_files(server_rec *s, apr_pool_t *p, apr_array_header_t *cert_files, diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index db469528bfc..7366c121a8d 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -1814,13 +1814,13 @@ static void balancer_display_page(request_rec *r, proxy_server_conf *conf, ap_rputs("Expr\n\n", r); - ap_rprintf(r, "Interval (ms)Interval (ms)\n", apr_time_as_msec(wsel->s->interval)); - ap_rprintf(r, "Passes triggerPasses trigger\n", wsel->s->passes); - ap_rprintf(r, "Fails trigger)Fails trigger)\n", wsel->s->fails); - ap_rprintf(r, "HC uriHC uri\n", ap_escape_html(r->pool, wsel->s->hcuri)); ap_rputs("\n\n", r); } diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 9109afede23..83b4e2cdd67 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1238,9 +1238,14 @@ int ap_proxy_http_process_response(proxy_http_req_t *req) save_table); } + /* + * Save a possible Transfer-Encoding header as we need it later for + * ap_http_filter to know where to end. + */ + te = apr_table_get(r->headers_out, "Transfer-Encoding"); + /* can't have both Content-Length and Transfer-Encoding */ - if (apr_table_get(r->headers_out, "Transfer-Encoding") - && apr_table_get(r->headers_out, "Content-Length")) { + if (te && apr_table_get(r->headers_out, "Content-Length")) { /* * 2616 section 4.4, point 3: "if both Transfer-Encoding * and Content-Length are received, the latter MUST be @@ -1258,12 +1263,6 @@ int ap_proxy_http_process_response(proxy_http_req_t *req) backend->close = 1; } - /* - * Save a possible Transfer-Encoding header as we need it later for - * ap_http_filter to know where to end. - */ - te = apr_table_get(r->headers_out, "Transfer-Encoding"); - upgrade = apr_table_get(r->headers_out, "Upgrade"); if (proxy_status == HTTP_SWITCHING_PROTOCOLS) { if (!upgrade || !req->upgrade || (strcasecmp(req->upgrade,