You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2019/10/19 13:58:16 UTC
svn commit: r1868625 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Author: ylavic
Date: Sat Oct 19 13:58:16 2019
New Revision: 1868625
URL: http://svn.apache.org/viewvc?rev=1868625&view=rev
Log:
mod_proxy_http: follow up to r1868576.
As suggested by Ruediger, let the HTTP_IN filter handle the 100 continue from
spool_reqbody_cl().
Also, according to rfc7231#section-5.1.1, we don't need the interim response
if we "already received some or all of the message body", which is now also
taken into account.
Modified:
httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1868625&r1=1868624&r2=1868625&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Sat Oct 19 13:58:16 2019
@@ -431,18 +431,18 @@ static int spool_reqbody_cl(proxy_http_r
apr_file_t *tmpfile = NULL;
apr_off_t limit;
- /* Send "100 Continue" now if the client expects one, before
- * blocking on the body, otherwise we'd wait for each other.
+ /*
+ * Tell the HTTP_IN filter that it should send a "100 continue" if the
+ * client expects one, before blocking on the body, otherwise we'd wait
+ * for each other.
*/
if (req->expecting_100) {
- int saved_status = r->status;
-
- r->expecting_100 = 1;
- r->status = HTTP_CONTINUE;
- ap_send_interim_response(r, 0);
- AP_DEBUG_ASSERT(!r->expecting_100);
-
- r->status = saved_status;
+ /* From https://tools.ietf.org/html/rfc7231#section-5.1.1
+ * A server MAY omit sending a 100 (Continue) response if it has
+ * already received some or all of the message body for the
+ * corresponding request, or if [snip].
+ */
+ r->expecting_100 = APR_BRIGADE_EMPTY(input_brigade);
req->expecting_100 = 0;
}