https://bz.apache.org/bugzilla/show_bug.cgi?id=69947

            Bug ID: 69947
           Summary: Support sending response before client's request has
                    ended. Rfc 2616.
           Product: Apache httpd-2
           Version: 2.4.62
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Prerequisites:
1) Apache 2.4.62;

Common:
Apache wrongly process premature upstream server's response on client's
request.
Seems like Rfc violation.

Actual behavior:
1) Client sends request(let's say POST) with a body.
2) Upstream server recognize that it cannot accept this request for any reason:
not authenticated, too big, i.e. 400-codes. Let's say reason is 413(TOO BIG);
3) Upstream server partially or completely DO NOT read the incoming request
body and sends premature response;
4) Apache server receives upstream server's response while processing client's
request;
5) Apache sends its own 502 error code to the client, but DOES NOT proxying
upstream server's response.
6) In Apache's logs i see the following:
"AH01097: pass request body failed to 127.0.0.1:4309 (127.0.0.1) from ::1 ()"

Links:
1) https://datatracker.ietf.org/doc/html/rfc2616 says:
```
8.2.2 Monitoring Connections for Error Status Messages

   An HTTP/1.1 (or later) client sending a message-body SHOULD monitor
   the network connection for an error status while it is transmitting
   the request. If the client sees an error status, it SHOULD
   immediately cease transmitting the body. If the body is being sent
   using a "chunked" encoding (section 3.6), a zero length chunk and
   empty trailer MAY be used to prematurely mark the end of the message.
   If the body was preceded by a Content-Length header, the client MUST
   close the connection.
```


What I tried:
1) tried to find any specific command/option for Apache configuration file to
fix this behavior;
2) workaround: when upstream server response AFTER the incoming request
completed - Apache it proxies well. But it's NOT a good option, because
machine's ports will experience high load due to this behavior.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to