mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
connection: skip no-op calling of body generation functions when response body is not used
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user