diff options
author | Stefan Eissing <icing@apache.org> | 2019-01-28 11:27:08 +0100 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2019-01-28 11:27:08 +0100 |
commit | a721d5cc9ebed4cb3679a935f4eb2cb167a78527 (patch) | |
tree | 853bdbf0a738e075569a1bdbc90c542e28b1ca04 /modules/http2/h2_ctx.c | |
parent | fr doc rebuild. (diff) | |
download | apache2-a721d5cc9ebed4cb3679a935f4eb2cb167a78527.tar.xz apache2-a721d5cc9ebed4cb3679a935f4eb2cb167a78527.zip |
*) mod_http2: Configuration directoves H2Push and H2Upgrade can now be specified per
Location/Directory, e.g. disabling PUSH for a specific set of resources. [Stefan Eissing]
*) mod_http2: HEAD requests to some module such as mod_cgid caused the stream to
terminate improperly and cause a HTTP/2 PROTOCOL_ERROR.
Fixes <https://github.com/icing/mod_h2/issues/167>. [Michael Kaufmann]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1852339 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2/h2_ctx.c')
-rw-r--r-- | modules/http2/h2_ctx.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/modules/http2/h2_ctx.c b/modules/http2/h2_ctx.c index d5ccc24dd6..095f3554b6 100644 --- a/modules/http2/h2_ctx.c +++ b/modules/http2/h2_ctx.c @@ -29,8 +29,8 @@ static h2_ctx *h2_ctx_create(const conn_rec *c) { h2_ctx *ctx = apr_pcalloc(c->pool, sizeof(h2_ctx)); ap_assert(ctx); + h2_ctx_server_update(ctx, c->base_server); ap_set_module_config(c->conn_config, &http2_module, ctx); - h2_ctx_server_set(ctx, c->base_server); return ctx; } @@ -79,8 +79,9 @@ h2_ctx *h2_ctx_protocol_set(h2_ctx *ctx, const char *proto) return ctx; } -h2_session *h2_ctx_session_get(h2_ctx *ctx) +h2_session *h2_ctx_get_session(conn_rec *c) { + h2_ctx *ctx = h2_ctx_get(c, 0); return ctx? ctx->session : NULL; } @@ -89,33 +90,17 @@ void h2_ctx_session_set(h2_ctx *ctx, struct h2_session *session) ctx->session = session; } -server_rec *h2_ctx_server_get(h2_ctx *ctx) +h2_ctx *h2_ctx_server_update(h2_ctx *ctx, server_rec *s) { - return ctx? ctx->server : NULL; -} - -h2_ctx *h2_ctx_server_set(h2_ctx *ctx, server_rec *s) -{ - ctx->server = s; + if (ctx->server != s) { + ctx->server = s; + } return ctx; } -int h2_ctx_is_task(h2_ctx *ctx) -{ - return ctx && ctx->task; -} - -h2_task *h2_ctx_get_task(h2_ctx *ctx) +h2_task *h2_ctx_get_task(conn_rec *c) { + h2_ctx *ctx = h2_ctx_get(c, 0); return ctx? ctx->task : NULL; } -h2_task *h2_ctx_cget_task(conn_rec *c) -{ - return h2_ctx_get_task(h2_ctx_get(c, 0)); -} - -h2_task *h2_ctx_rget_task(request_rec *r) -{ - return h2_ctx_get_task(h2_ctx_rget(r)); -} |