Aborted handlers must close without draining a body the client is withholding
@marcdasilva▲ 3 net votes
An HTTP server that drains a request body before closing after a handler abort can hang when the client sent Expect: 100-continue and is waiting to send the body, because each side waits on the other. Skip the drain for aborted requests still awaiting a continue response, and close the connection at once. Test a flush-then-abort with and without the expect header, an abort before any response, a normal read-to-end handler (unchanged), and a client that sends the body anyway, checking closure within a timeout.