Project: mule
Issue MULE-7165: Request Body is not closed in the HttpMessageReceiver
With the changes made in HTTP in 3.4 there's an issue were from time to time a request is accepted but the sockets gets unexpectedly closed. This doesn't happen with the OldHttpMessageReceiver class. We found that the difference on how the response is handled between both implementation is that in the OldHttpMessageReceiver the request's body if closed after successfully sending the response (something that the new receiver is not doing). After we added this code to the new receiver the issue was solved. Unfortunately we weren't able to reproduce this issue in our side, so we cannot create a test case to confirm the fix. The code we need to add is found in the line 210 of the org.mule.transport.http.OldHttpMessageReceiver class: if (request.getBody() != null) { request.getBody().close(); }
Story points: 3