Commit be6241e6 authored by Stefan Eissing's avatar Stefan Eissing
Browse files

Merge of r1766857,1767128,1767180,1767181,1767553 from trunk

mod_http2/mod_proxy_http2 improvments as in CHANGES


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1767563 13f79535-47bb-0310-9956-ffa450edef68
parent 95009316
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2,6 +2,18 @@

Changes with Apache 2.4.24

  *) mod_http2: unannounced and multiple interim responses (status code < 200)
     are parsed and forwarded to client until a final response arrives.
     [Stefan Eissing]
  
  *) mod_proxy_http2: improved robustness when main connection is closed early
     by resetting all ongoing streams against the backend.
     [Stefan Eissing]
  
  *) mod_http2: allocators from slave connections are released earlier, resulting
     in less overall memory use on busy, long lived connections.
     [Stefan Eissing]
     
  *) mod_remoteip: Pick up where we left off during a subrequest rather
     than running with the modified XFF but original TCP address.
     PR 49839/PR 60251
+0 −12
Original line number Diff line number Diff line
@@ -355,18 +355,6 @@ $(OBJDIR)/mod_http2.imp : NWGNUmod_http2
	@echo $(DL)GEN  $@$(DL)
	@echo $(DL) (HTTP2)$(DL) > $@
	@echo $(DL) http2_module,$(DL) >> $@
	@echo $(DL) h2_ihash_add,$(DL) >> $@
	@echo $(DL) h2_ihash_clear,$(DL) >> $@
	@echo $(DL) h2_ihash_count,$(DL) >> $@
	@echo $(DL) h2_ihash_create,$(DL) >> $@
	@echo $(DL) h2_ihash_empty,$(DL) >> $@
	@echo $(DL) h2_ihash_iter,$(DL) >> $@
	@echo $(DL) h2_ihash_remove,$(DL) >> $@
	@echo $(DL) h2_iq_add,$(DL) >> $@
	@echo $(DL) h2_iq_create,$(DL) >> $@
	@echo $(DL) h2_iq_remove,$(DL) >> $@
	@echo $(DL) h2_log2,$(DL) >> $@
	@echo $(DL) h2_headers_add_h1,$(DL) >> $@
	@echo $(DL) nghttp2_is_fatal,$(DL) >> $@
	@echo $(DL) nghttp2_option_del,$(DL) >> $@
	@echo $(DL) nghttp2_option_new,$(DL) >> $@
+0 −4
Original line number Diff line number Diff line
@@ -122,15 +122,11 @@ struct h2_request {
    const char *scheme;
    const char *authority;
    const char *path;
    
    apr_table_t *headers;

    apr_time_t request_time;
    
    unsigned int chunked : 1;   /* iff requst body needs to be forwarded as chunked */
    unsigned int serialize : 1; /* iff this request is written in HTTP/1.1 serialization */
    unsigned int expect_100 : 1; /* iff we need a 100-continue response */
    unsigned int expect_failed : 1; /* iff we are unable to fullfill expects */
};

typedef struct h2_headers h2_headers;
+4 −16
Original line number Diff line number Diff line
@@ -241,9 +241,9 @@ apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c)
    return status;
}

conn_rec *h2_slave_create(conn_rec *master, int slave_id, 
                          apr_pool_t *parent, apr_allocator_t *allocator)
conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent)
{
    apr_allocator_t *allocator;
    apr_pool_t *pool;
    conn_rec *c;
    void *cfg;
@@ -257,9 +257,7 @@ conn_rec *h2_slave_create(conn_rec *master, int slave_id,
     * independant of its parent pool in the sense that it can work in
     * another thread.
     */
    if (!allocator) {
    apr_allocator_create(&allocator);
    }
    apr_pool_create_ex(&pool, parent, NULL, allocator);
    apr_pool_tag(pool, "h2_slave_conn");
    apr_allocator_owner_set(allocator, pool);
@@ -311,21 +309,11 @@ conn_rec *h2_slave_create(conn_rec *master, int slave_id,
    return c;
}

void h2_slave_destroy(conn_rec *slave, apr_allocator_t **pallocator)
void h2_slave_destroy(conn_rec *slave)
{
    apr_pool_t *parent;
    apr_allocator_t *allocator = apr_pool_allocator_get(slave->pool);
    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, slave,
                  "h2_slave_conn(%ld): destroy (task=%s)", slave->id,
                  apr_table_get(slave->notes, H2_TASK_ID_NOTE));
    /* Attache the allocator to the parent pool and return it for
     * reuse, otherwise the own is still the slave pool and it will
     * get destroyed with it. */
    parent = apr_pool_parent_get(slave->pool);
    if (pallocator && parent) {
        apr_allocator_owner_set(allocator, parent);
        *pallocator = allocator;
    }
    apr_pool_destroy(slave->pool);
}

+2 −3
Original line number Diff line number Diff line
@@ -66,9 +66,8 @@ typedef enum {
h2_mpm_type_t h2_conn_mpm_type(void);


conn_rec *h2_slave_create(conn_rec *master, int slave_id, 
                          apr_pool_t *parent, apr_allocator_t *allocator);
void h2_slave_destroy(conn_rec *slave, apr_allocator_t **pallocator);
conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent);
void h2_slave_destroy(conn_rec *slave);

apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd);
void h2_slave_run_connection(conn_rec *slave);
Loading