Commit a6bd723b authored by Yann Ylavic's avatar Yann Ylavic
Browse files

Merge r1827362, r1828926, r1828927, r1829557, r1829573, r1829645, r1829657 from trunk:

core: ap_getline_core() reads nothing for n == 0.

PR62199: add worker parameter ResponseFieldSize to mod_proxy

Submitted By: Hank Ibell
Committed By: covener


add log id for r1828926


core: Add and handle AP_GETLINE_NOSPC_EOL flag in ap_rgetline_core().

This tells the ap_getline() family of functions to consume the end of line
when the buffer is exhausted.

PR 62198.


mod_proxy_http: make use of AP_GETLINE_NOSPC_EOL in ap_proxygetline().

Fixes response header thrown away after the previous one was considered too
large and truncated.

PR 62196.


core: forward flags to recursive/folding call to ap_rgetline_core().

We still need them when folding, other than AP_GETLINE_FOLD itself of course.


mod_proxy_http: follow up to r1829573: remain EBCDIC friendly.

Keep using ap_rgetline() as before r1829573, since ap_rgetline_core() is
EBCDIC agnostic.


Submitted by: ylavic, covener, covener, ylavic, ylavic, ylavic, ylavic
Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1834093 13f79535-47bb-0310-9956-ffa450edef68
parent 90949a35
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.34

  *) mod_proxy_http: Fix response header thrown away after the previous one
     was considered too large and truncated. PR 62196. [Yann Ylavic]

  *) core: Add and handle AP_GETLINE_NOSPC_EOL flag for ap_getline() family
     of functions to consume the end of line when the buffer is exhausted.
     PR 62198. [Yann Ylavic]

  *) mod_proxy_http: Add new worker parameter 'responsefieldsize' to
     allow maximum HTTP response header size to be increased past 8192 
     bytes.  PR62199.  [Hank Ibell <hwibell gmail.com>]

  *) mod_ssl: Extend SSLOCSPEnable with mode 'leaf' that only checks the leaf
     of a certificate chain.  PR62112.
     [Ricardo Martin Camarero <rickyepoderi yahoo.es>]
+8 −0
Original line number Diff line number Diff line
@@ -1111,6 +1111,14 @@ ProxyPass "/mirror/foo/i" "!"
        to override the <directive>ProxyIOBufferSize</directive> for a specific worker.
        This must be at least 512 or set to 0 for the system default of 8192.
    </td></tr>
    <tr><td>responsefieldsize</td>
        <td>8192</td>
        <td>Adjust the size of the proxy response field buffer. The buffer size
            should be at least the size of the largest expected header size from
            a proxied response. Setting the value to 0 will use the system
            default of 8192 bytes.<br />
        Available in Apache HTTP Server 2.4.34 and later.
    </td></tr>
    <tr><td>keepalive</td>
        <td>Off</td>
        <td><p>This parameter should be used when you have a firewall between your
+4 −2
Original line number Diff line number Diff line
@@ -512,7 +512,9 @@
 *                          ap_regcomp_default_cflag_by_name
 * 20120211.75 (2.4.30-dev) Add hostname_ex to proxy_worker_shared
 * 20120211.76 (2.4.30-dev) Add CONN_STATE_NUM to enum conn_state_e
 * 20120211.77 (2.4.34-dev)  add ap_exists_directive()
 * 20120211.77 (2.4.34-dev) Add ap_exists_directive()
 * 20120211.78 (2.4.34-dev) Add response_field_size to proxy_worker_shared 
 * 20120211.79 (2.4.34-dev) Add AP_GETLINE_NOSPC_EOL flag to http_protocol.h
 */

#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -520,7 +522,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
#define MODULE_MAGIC_NUMBER_MINOR 77                  /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 79                  /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+3 −1
Original line number Diff line number Diff line
@@ -607,6 +607,8 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);

#define AP_GETLINE_FOLD 1 /* Whether to merge continuation lines */
#define AP_GETLINE_CRLF 2 /* Whether line ends must be in the form CR LF */
#define AP_GETLINE_NOSPC_EOL 4 /* Whether to consume up to and including the
                                  end of line on APR_ENOSPC */

/**
 * Get the next line of input for the request
+8 −0
Original line number Diff line number Diff line
@@ -319,6 +319,14 @@ static const char *set_worker_param(apr_pool_t *p,
                                (int)sizeof(worker->s->upgrade));
        }
    }
    else if (!strcasecmp(key, "responsefieldsize")) {
        long s = atol(val);
        if (s < 0) {
            return "ResponseFieldSize must be greater than 0 bytes, or 0 for system default.";
        }
        worker->s->response_field_size = (s ? s : HUGE_STRING_LEN);
        worker->s->response_field_size_set = 1;
    }
    else {
        if (set_worker_hc_param_f) {
            return set_worker_hc_param_f(p, s, worker, key, val, NULL);
Loading