If the answer you have has the Client-Warning heading, as you can see from the answer below, then this is a tcp-level error, and the response is created by the LWP client, not the server:
500 Server closed connection without sending any data back Content-Type: text/plain Client-Date: Thu, 19 Sep 2013 08:04:28 GMT Client-Warning: Internal response
source share