diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index f33f9a9f..7624711a 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -5091,10 +5091,15 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) } #endif /* UPGRADE_SUPPORT */ - if (connection->rp.props.chunked) - connection->state = MHD_CONNECTION_CHUNKED_BODY_UNREADY; + if (connection->rp.props.send_reply_body) + { + if (connection->rp.props.chunked) + connection->state = MHD_CONNECTION_CHUNKED_BODY_UNREADY; + else + connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY; + } else - connection->state = MHD_CONNECTION_NORMAL_BODY_UNREADY; + connection->state = MHD_CONNECTION_FOOTERS_SENT; continue; case MHD_CONNECTION_NORMAL_BODY_READY: /* nothing to do here */