summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy_http.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-05-30 17:54:34 +0200
committerYann Ylavic <ylavic@apache.org>2022-05-30 17:54:34 +0200
commit9a8214d08fac52dda13ecc673ade2f5152f8e9de (patch)
tree57cde6e5bfc2573de2237d52ab9f122499620993 /modules/proxy/mod_proxy_http.c
parentMerge of PR 318: (diff)
downloadapache2-9a8214d08fac52dda13ecc673ade2f5152f8e9de.tar.xz
apache2-9a8214d08fac52dda13ecc673ade2f5152f8e9de.zip
mod_proxy_http: Avoid 417 responses for non forwardable 100-continue. PR 65666.
Stop returning 417 when mod_proxy has to forward an HTTP/1.1 request with both "Expect: 100-continue" and "force-proxy-request-1.0" set, mod_proxy can instead handle the 100-continue by itself before forwarding the request, like in the "Proxy100Continue Off" case. Note that this does not change the behaviour of httpd receiving an HTTP/1.0 request with an Expect header, ap_check_request_header() will still correctly return 417 in this case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901420 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/mod_proxy_http.c')
-rw-r--r--modules/proxy/mod_proxy_http.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
index d86f29afb4..c0b20c2462 100644
--- a/modules/proxy/mod_proxy_http.c
+++ b/modules/proxy/mod_proxy_http.c
@@ -547,10 +547,6 @@ static int ap_proxy_http_prefetch(proxy_http_req_t *req,
apr_off_t bytes;
int rv;
- if (req->force10 && r->expecting_100) {
- return HTTP_EXPECTATION_FAILED;
- }
-
rv = ap_proxy_create_hdrbrgd(p, header_brigade, r, p_conn,
req->worker, req->sconf,
uri, url, req->server_portstr,
@@ -2008,8 +2004,9 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
apr_pool_userdata_get((void **)&input_brigade, "proxy-req-input", p);
/* Should we handle end-to-end or ping 100-continue? */
- if ((r->expecting_100 && (dconf->forward_100_continue || input_brigade))
- || PROXY_DO_100_CONTINUE(worker, r)) {
+ if (!req->force10
+ && ((r->expecting_100 && (dconf->forward_100_continue || input_brigade))
+ || PROXY_SHOULD_PING_100_CONTINUE(worker, r))) {
req->do_100_continue = 1;
}