"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mod_http2/h2_headers.c" between
mod_http2-1.15.14.tar.gz and mod_http2-1.15.16.tar.gz

About: mod_h[ttp]2 is an Apache httpd module implementing the HTTP2 protocol. It uses nghttp2 as base engine and connects it with the Apache infrastructure. Hint: Module (previous name "mod_h2") now integrated into Apache httpd (since v2.4.17). Experimental release.

h2_headers.c  (mod_http2-1.15.14):h2_headers.c  (mod_http2-1.15.16)
skipping to change at line 66 skipping to change at line 66
apr_bucket * h2_bucket_headers_make(apr_bucket *b, h2_headers *r) apr_bucket * h2_bucket_headers_make(apr_bucket *b, h2_headers *r)
{ {
h2_bucket_headers *br; h2_bucket_headers *br;
br = apr_bucket_alloc(sizeof(*br), b->list); br = apr_bucket_alloc(sizeof(*br), b->list);
br->headers = r; br->headers = r;
b = apr_bucket_shared_make(b, br, 0, 0); b = apr_bucket_shared_make(b, br, 0, 0);
b->type = &h2_bucket_type_headers; b->type = &h2_bucket_type_headers;
b->length = h2_headers_length(r);
return b; return b;
} }
apr_bucket * h2_bucket_headers_create(apr_bucket_alloc_t *list, apr_bucket * h2_bucket_headers_create(apr_bucket_alloc_t *list,
h2_headers *r) h2_headers *r)
{ {
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
APR_BUCKET_INIT(b); APR_BUCKET_INIT(b);
skipping to change at line 126 skipping to change at line 127
{ {
h2_headers *headers = apr_pcalloc(pool, sizeof(h2_headers)); h2_headers *headers = apr_pcalloc(pool, sizeof(h2_headers));
headers->status = status; headers->status = status;
headers->headers = (headers_in? apr_table_clone(pool, headers_in) headers->headers = (headers_in? apr_table_clone(pool, headers_in)
: apr_table_make(pool, 5)); : apr_table_make(pool, 5));
headers->notes = (notes? apr_table_clone(pool, notes) headers->notes = (notes? apr_table_clone(pool, notes)
: apr_table_make(pool, 5)); : apr_table_make(pool, 5));
return headers; return headers;
} }
static int add_header_lengths(void *ctx, const char *name, const char *value)
{
apr_size_t *plen = ctx;
*plen += strlen(name) + strlen(value);
return 1;
}
apr_size_t h2_headers_length(h2_headers *headers)
{
apr_size_t len = 0;
apr_table_do(add_header_lengths, &len, headers->headers, NULL);
return len;
}
h2_headers *h2_headers_rcreate(request_rec *r, int status, h2_headers *h2_headers_rcreate(request_rec *r, int status,
apr_table_t *header, apr_pool_t *pool) apr_table_t *header, apr_pool_t *pool)
{ {
h2_headers *headers = h2_headers_create(status, header, r->notes, 0, pool); h2_headers *headers = h2_headers_create(status, header, r->notes, 0, pool);
if (headers->status == HTTP_FORBIDDEN) { if (headers->status == HTTP_FORBIDDEN) {
request_rec *r_prev; request_rec *r_prev;
for (r_prev = r; r_prev != NULL; r_prev = r_prev->prev) { for (r_prev = r; r_prev != NULL; r_prev = r_prev->prev) {
const char *cause = apr_table_get(r_prev->notes, "ssl-renegotiate-fo rbidden"); const char *cause = apr_table_get(r_prev->notes, "ssl-renegotiate-fo rbidden");
if (cause) { if (cause) {
/* This request triggered a TLS renegotiation that is not allowe d /* This request triggered a TLS renegotiation that is not allowe d
 End of changes. 2 change blocks. 
0 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)