mochi/mochiweb — pull request #79 by jdhood1 (2012-06-22 17:54:32+00:00)
Title: Prevent Unnecessary Socket Exceptions

We were seeing a lot of seemingly harmless socket exceptions in our system. After a little digging, I found out that it's because the client is closing the socket as soon as it receives a complete message from mochiweb:respond(). Unfortunately, mochiweb:respond() would then try to send the body, even when it is blank (""), which was causing the exception. This change cleans up those unnecessary exceptions.