mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user