Commit 28017337 authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_proxy_http: forward 100-continue, and minimize race conditions when

reusing backend connections. PR 60330.

+1: ylavic, icing, jim
ylavic: plus http://svn.apache.org/r1856036 (opt-out)
2.4.x patch: http://people.apache.org/~ylavic/patches/httpd-2.4.x-forward_100_continue-v6.patch
+1: ylavic, jim, minfrin


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

  *) mod_proxy_http: forward 100-continue, and minimize race conditions when
     reusing backend connections. PR 60330. [Yann Ylavic, Jean-Frederic Clere]

  *) Easy patches: synch 2.4.x and trunk
        - core: 80 chars
        - http_core: Clean-uo and style. No functional change overall
+0 −35
Original line number Diff line number Diff line
@@ -128,41 +128,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]


  *) mod_proxy_http: forward 100-continue, and minimize race conditions when
     reusing backend connections. PR 60330.
     trunk patch: http://svn.apache.org/r1656259
                  http://svn.apache.org/r1656359
                  http://svn.apache.org/r1721759
                  http://svn.apache.org/r1729507
                  http://svn.apache.org/r1729749
                  http://svn.apache.org/r1754159
                  http://svn.apache.org/r1836588
                  http://svn.apache.org/r1836648
                  http://svn.apache.org/r1836716
                  http://svn.apache.org/r1836750
                  http://svn.apache.org/r1837040
                  http://svn.apache.org/r1853407
                  http://svn.apache.org/r1853518
                  http://svn.apache.org/r1853561
                  http://svn.apache.org/r1853566
                  http://svn.apache.org/r1853953
                  http://svn.apache.org/r1853956
     2.4.x patch: http://people.apache.org/~ylavic/patches/httpd-2.4.x-forward_100_continue-v4.patch
     ylavic: please note the "s/ASCII_(CRLF|ZERO)/\1_ASCII/g" in the backport,
             same as in trunk (where definitions come from httpd.h) so doing
             the change now in 2.4.x helps backports. Since in 2.4.x these
             macros are still locally #defined, I also added the #ifdefs around
             them to avoid potential issues..
             @icing: sorry I had to reset your vote for v4, but it looks
             sensible to me to have trunk and 2.4.x code in sync as much as
             possible. Changes from v3 to v4 (r1853953 mainly, r1853956 is only
             comment) are non functional (or at least intended as such).
     +1: ylavic, icing, jim
     ylavic: plus http://svn.apache.org/r1856036 (opt-out)
     2.4.x patch: http://people.apache.org/~ylavic/patches/httpd-2.4.x-forward_100_continue-v6.patch
     +1: ylavic, jim, minfrin


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]

+23 −0
Original line number Diff line number Diff line
@@ -2065,6 +2065,29 @@ header for proxied requests</description>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>Proxy100Continue</name>
<description>Forward 100-continue expectation to the origin server</description>
<syntax>Proxy100Continue Off|On</syntax>
<default>Proxy100Continue On</default>
<contextlist><context>server config</context>
<context>virtual host</context>
<context>directory</context>
</contextlist>
<compatibility>Available in version 2.4.39 and later</compatibility>

<usage>
    <p>This directive determines whether the proxy should forward 100-continue
    <em>Expect:</em>ation to the origin server and thus let it decide when/if
    the HTTP request body should be read, or when <code>Off</code> the proxy
    should generate <em>100 Continue</em> intermediate response by itself before
    forwarding the request body.</p>
    <note><title>Effectiveness</title>
     <p>This option is of use only for HTTP proxying, as handled by <module>mod_proxy_http</module>.</p>
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>ProxySourceAddress</name>
<description>Set local IP address for outgoing proxy connections</description>
+2 −2
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@
 * 20120211.84 (2.4.35-dev) Add ap_no2slash_ex() and merge_slashes to 
 *                          core_server_conf.
 * 20120211.85 (2.4.40-dev) add ap_set_conn_count().
 *
 * 20120211.86 (2.4.35-dev) Add forward_100_continue{,_set} to proxy_dir_conf
 */

#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -534,7 +534,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
#define MODULE_MAGIC_NUMBER_MINOR 85                  /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 86                  /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+0 −2
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ typedef struct h2_proxy_ctx {
    int capacity;
    
    unsigned is_ssl : 1;
    unsigned flushall : 1;
    
    request_rec *r;            /* the request processed in this ctx */
    apr_status_t r_status;     /* status of request work */
@@ -337,7 +336,6 @@ static int proxy_http2_handler(request_rec *r,
    ctx->is_ssl = is_ssl;
    ctx->worker = worker;
    ctx->conf = conf;
    ctx->flushall = apr_table_get(r->subprocess_env, "proxy-flushall")? 1 : 0;
    ctx->req_buffer_size = (32*1024);
    ctx->r = r;
    ctx->r_status = status = HTTP_SERVICE_UNAVAILABLE;
Loading