
Fix infinite loop (DoS) when HTTP connection is reset.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>

Index: src/microhttpd/connection.c
===================================================================
--- src/microhttpd/connection.c	(revision 33148)
+++ src/microhttpd/connection.c	(working copy)
@@ -1612,9 +1612,13 @@
   if (bytes_read < 0)
     {
       const int err = MHD_socket_errno_;
-      if ((EINTR == err) || (EAGAIN == err) || (ECONNRESET == err)
-          || (EWOULDBLOCK == err))
+      if ((EINTR == err) || (EAGAIN == err) || (EWOULDBLOCK == err))
 	  return MHD_NO;
+      if (ECONNRESET == err)
+        {
+           CONNECTION_CLOSE_ERROR(connection, NULL);
+	   return MHD_NO;
+	}
 #if HAVE_MESSAGES
 #if HTTPS_SUPPORT
       if (0 != (connection->daemon->options & MHD_USE_SSL))
