On 17.08.2010 17:08, Jim Jagielski wrote:
On Aug 17, 2010, at 10:55 AM, Rainer Jung wrote:
On 17.08.2010 16:43, j...@apache.org wrote:
Author: jim
Date: Tue Aug 17 14:43:45 2010
New Revision: 986333
URL: http://svn.apache.org/viewvc?rev=986333&view=rev
Log:
Further checks for non-body requests...
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=986333&r1=986332&r2=986333&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Tue Aug 17 14:43:45 2010
@@ -704,8 +704,15 @@ int ap_proxy_http_request(apr_pool_t *p,
* Send the HTTP/1.1 request to the remote server
*/
+ /*
+ * To be compliant, we only use 100-Continue for requests with no bodies.
+ * We also make sure we won't be talking HTTP/1.0 as well.
+ */
do_100_continue = (worker->ping_timeout_set
&& !r->header_only
+&& !r->kept_body
+&& !(apr_table_get(r->headers_in, "Content-Length"))
+&& !(apr_table_get(r->headers_in, "Transfer-Encoding"))
Did you mean:
&& (!apr_table_get(r->headers_in, "Content-Length") ||
!apr_table_get(r->headers_in, "Transfer-Encoding")
If it has CL but not TE then we get
&& ( 0 || 1)
which is not what we want... We need to make sure it doesn't
have CL and that is also doesn't have TE. If it has either
one, then a body exists.
Sorry, then my remark should have already been applied higher up (at the
new code comment). Doesn't the RFC say, the expectation is *not* allowed
if there is *no* request body?
Cited from 8.2.3: "A client MUST NOT send an Expect request-header field
(section 14.20) with the "100-continue" expectation if it does not
intend to send a request body."
Regards,
Rainer