Commit 4e71cd02 authored by Stefan Eissing's avatar Stefan Eissing
Browse files

Merge r1736463,r1737006,r1737021,r1737102,r1737125,r1737254 from trunk:

mod_http2: backport of version 1.4.6


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1737255 13f79535-47bb-0310-9956-ffa450edef68
parent eea3dda6
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2,8 +2,17 @@

Changes with Apache 2.4.20

  *) mod_http2: incrementing keepalives on each request started so that logging
     %k gives increasing numbers per master http2 connection. 
     New documented variables in env, usable in custom log formats: H2_PUSH,
     H2_PUSHED, H2_PUSHED_ON, H2_STREAM_ID and H2_STREAM_TAG.
     [Stefan Eissing]

  *) mod_http2: more efficient passing of response bodies with less contention
     and file bucket forwarding. [Stefan Eissing]

  *) mod_http2: fix for missing score board updates on request count, fix for
     memory leak on slave connection reuse.
     memory leak on slave connection reuse. [Stefan Eissing]
     
  *) mod_http2: Fix build on Windows from dsp files.
     [Stefan Eissing] 
+9 −3
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@
    <section id="envvars"><title>Environment Variables</title>
        
        <p>This module can be configured to provide HTTP/2 related information
            as additional environment variables to the SSI and CGI namespace.
            as additional environment variables to the SSI and CGI namespace, as well
            as in custom log configurations (see <code>%{VAR_NAME}e</code>).
        </p>
        
        <table border="1">
@@ -67,8 +68,13 @@
                <th>Value Type:</th>
                <th>Description:</th>
            </tr>
            <tr><td><code>HTTPe</code></td>                         <td>flag</td>      <td>HTTP/2 is being used.</td></tr>
            <tr><td><code>H2PUSH</code></td>                        <td>flag</td>      <td>HTTP/2 Server Push is enabled for this request and also supported by the client.</td></tr>
            <tr><td><code>HTTP2</code></td><td>flag</td><td>HTTP/2 is being used.</td></tr>
            <tr><td><code>H2PUSH</code></td><td>flag</td><td>HTTP/2 Server Push is enabled for this connection and also supported by the client.</td></tr>
            <tr><td><code>H2_PUSH</code></td><td>flag</td><td>alternate name for <code>H2PUSH</code></td></tr>
            <tr><td><code>H2_PUSHED</code></td><td>string</td><td>empty or <code>PUSHED</code> for a request being pushed by the server.</td></tr>
            <tr><td><code>H2_PUSHED_ON</code></td><td>number</td><td>HTTP/2 stream number that triggered the push of this request.</td></tr>
            <tr><td><code>H2_STREAM_ID</code></td><td>number</td><td>HTTP/2 stream number of this request.</td></tr>
            <tr><td><code>H2_STREAM_TAG</code></td><td>string</td><td>HTTP/2 process unique stream identifier, consisting of connection id and stream id separated by <code>-</code>.</td></tr>
        </table>
        
    </section>
+2 −1
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ typedef struct h2_request h2_request;

struct h2_request {
    int id;             /* stream id */
    int initiated_on;   /* initiating stream id (PUSH) or 0 */
    
    const char *method; /* pseudo header values, see ch. 8.1.2.3 */
    const char *scheme;
+5 −1
Original line number Diff line number Diff line
@@ -65,7 +65,11 @@ h2_ctx *h2_ctx_rget(const request_rec *r)

const char *h2_ctx_protocol_get(const conn_rec *c)
{
    h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
    h2_ctx *ctx;
    if (c->master) {
        c = c->master;
    }
    ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
    return ctx? ctx->protocol : NULL;
}

+3 −3
Original line number Diff line number Diff line
@@ -275,9 +275,9 @@ static apr_status_t h2_sos_h2_status_read_to(h2_sos *sos, apr_bucket_brigade *bb
    return sos->prev->read_to(sos->prev, bb, plen, peos);
}

static apr_status_t h2_sos_h2_status_prep_read(h2_sos *sos, apr_off_t *plen, int *peos)
static apr_status_t h2_sos_h2_status_prepare(h2_sos *sos, apr_off_t *plen, int *peos)
{
    return sos->prev->prep_read(sos->prev, plen, peos);
    return sos->prev->prepare(sos->prev, plen, peos);
}

static apr_status_t h2_sos_h2_status_readx(h2_sos *sos, h2_io_data_cb *cb, void *ctx,
@@ -304,7 +304,7 @@ static h2_sos *h2_sos_h2_status_create(h2_sos *prev)
    sos->response     = response;
    sos->stream       = prev->stream;
    sos->buffer       = h2_sos_h2_status_buffer;
    sos->prep_read    = h2_sos_h2_status_prep_read;
    sos->prepare      = h2_sos_h2_status_prepare;
    sos->readx        = h2_sos_h2_status_readx;
    sos->read_to      = h2_sos_h2_status_read_to;
    sos->get_trailers = h2_sos_h2_status_get_trailers;
Loading