Commit 01b4504a authored by Stefan Eissing's avatar Stefan Eissing
Browse files

On the trunk:

 * silencing gcc uninitialized warning
 * refrainning from apr_table_addn() use since pool debug assumptions are in conflict
 * adding more assertions
 * copy-porting changes to base64 encoding code from mod_md



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1835118 13f79535-47bb-0310-9956-ffa450edef68
parent 75a52209
Loading
Loading
Loading
Loading
+1 −1
Changes for modules/http2/h2_bucket_beam.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -775,7 +775,7 @@ static apr_status_t append_bucket(h2_bucket_beam *beam,
    const char *data;
    apr_size_t len;
    apr_status_t status;
    int can_beam, check_len;
    int can_beam = 0, check_len;
    
    if (beam->aborted) {
        return APR_ECONNABORTED;
+2 −2
Changes for modules/http2/h2_from_h1.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static int copy_header(void *ctx, const char *name, const char *value)
{
    apr_table_t *headers = ctx;
    
    apr_table_addn(headers, name, value);
    apr_table_add(headers, name, value);
    return 1;
}

@@ -250,7 +250,7 @@ static h2_headers *create_response(h2_task *task, request_rec *r)
    if (r->no_cache && !apr_table_get(r->headers_out, "Expires")) {
        char *date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
        ap_recent_rfc822_date(date, r->request_time);
        apr_table_addn(r->headers_out, "Expires", date);
        apr_table_add(r->headers_out, "Expires", date);
    }
    
    /* This is a hack, but I can't find anyway around it.  The idea is that
+1 −1
Changes for modules/http2/h2_h2.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -696,7 +696,7 @@ static void check_push(request_rec *r, const char *tag)
                      tag, conf->push_list->nelts);
        for (i = 0; i < conf->push_list->nelts; ++i) {
            h2_push_res *push = &APR_ARRAY_IDX(conf->push_list, i, h2_push_res);
            apr_table_addn(r->headers_out, "Link", 
            apr_table_add(r->headers_out, "Link", 
                           apr_psprintf(r->pool, "<%s>; rel=preload%s", 
                                        push->uri_ref, push->critical? "; critical" : ""));
        }
+3 −4
Changes for modules/http2/h2_headers.c: 3 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -116,9 +116,9 @@ h2_headers *h2_headers_create(int status, apr_table_t *headers_in,
{
    h2_headers *headers = apr_pcalloc(pool, sizeof(h2_headers));
    headers->status    = status;
    headers->headers   = (headers_in? apr_table_copy(pool, headers_in)
    headers->headers   = (headers_in? apr_table_clone(pool, headers_in)
                           : apr_table_make(pool, 5));
    headers->notes     = (notes? apr_table_copy(pool, notes)
    headers->notes     = (notes? apr_table_clone(pool, notes)
                           : apr_table_make(pool, 5));
    return headers;
}
@@ -149,8 +149,7 @@ h2_headers *h2_headers_rcreate(request_rec *r, int status,

h2_headers *h2_headers_copy(apr_pool_t *pool, h2_headers *h)
{
    return h2_headers_create(h->status, apr_table_copy(pool, h->headers), 
                             apr_table_copy(pool, h->notes), h->raw_bytes, pool);
    return h2_headers_create(h->status, h->headers, h->notes, h->raw_bytes, pool);
}

h2_headers *h2_headers_die(apr_status_t type,
+4 −0
Changes for modules/http2/h2_mplx.c: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -473,6 +473,7 @@ void h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
            h2_ihash_iter(m->shold, report_stream_iter, m);
        }
    }
    ap_assert(m->tasks_active == 0);
    m->join_wait = NULL;
    
    /* 4. close the h2_req_enginge shed */
@@ -762,6 +763,9 @@ apr_status_t h2_mplx_pop_task(h2_mplx *m, h2_task **ptask)
    apr_status_t rv = APR_EOF;
    
    *ptask = NULL;
    ap_assert(m);
    ap_assert(m->lock);
    
    if (APR_SUCCESS != (rv = apr_thread_mutex_lock(m->lock))) {
        return rv;
    }
Loading