diff options
author | Stefan Eissing <icing@apache.org> | 2016-11-01 20:40:37 +0100 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2016-11-01 20:40:37 +0100 |
commit | 29d168102556c119f62a3f28f5a3695fe93e9a96 (patch) | |
tree | eb8b608b33c0e634f3229a426d4e142a37a2c28d /modules/http2/h2_request.c | |
parent | Rebuild. (diff) | |
download | apache2-29d168102556c119f62a3f28f5a3695fe93e9a96.tar.xz apache2-29d168102556c119f62a3f28f5a3695fe93e9a96.zip |
mod_http2: proper parsing and forwarding of multiple or unnaounce 1xx responses
mod_proxy_http2: improved robustness when main connection gets aborted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1767553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2/h2_request.c')
-rw-r--r-- | modules/http2/h2_request.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c index 0a6f6b58fc..6ba8108449 100644 --- a/modules/http2/h2_request.c +++ b/modules/http2/h2_request.c @@ -187,16 +187,6 @@ apr_status_t h2_request_end_headers(h2_request *req, apr_pool_t *pool, int eos) } } - s = apr_table_get(req->headers, "Expect"); - if (s && s[0]) { - if (ap_cstr_casecmp(s, "100-continue") == 0) { - req->expect_100 = 1; - } - else { - req->expect_failed = 1; - } - } - return APR_SUCCESS; } @@ -215,6 +205,7 @@ request_rec *h2_request_create_rec(const h2_request *req, conn_rec *c) { int access_status = HTTP_OK; const char *rpath; + const char *s; request_rec *r = ap_create_request(c); @@ -250,12 +241,15 @@ request_rec *h2_request_create_rec(const h2_request *req, conn_rec *c) /* we may have switched to another server */ r->per_dir_config = r->server->lookup_defaults; - if (req->expect_100) { - r->expecting_100 = 1; - } - else if (req->expect_failed) { - r->status = HTTP_EXPECTATION_FAILED; - ap_send_error_response(r, 0); + s = apr_table_get(r->headers_in, "Expect"); + if (s && s[0]) { + if (ap_cstr_casecmp(s, "100-continue") == 0) { + r->expecting_100 = 1; + } + else { + r->status = HTTP_EXPECTATION_FAILED; + ap_send_error_response(r, 0); + } } /* |