upgrade response: set response size to zero

Upgrade responses do not have body, so zero must be used as the body size.
This commit is contained in:
Evgeny Grin (Karlson2k)
2022-03-08 10:35:47 +03:00
parent 1a46bfd6e0
commit b26d68a71c
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -3968,8 +3968,6 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
(NULL != resp->crc) );
mhd_assert ( (0 == connection->response_write_position) || \
(resp->total_size ==
connection->response_write_position) || \
(MHD_SIZE_UNKNOWN ==
connection->response_write_position) );
mhd_assert ((MHD_CONN_MUST_UPGRADE != connection->keepalive) || \
(! connection->rp_props.send_reply_body));
+1 -1
View File
@@ -1942,7 +1942,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler upgrade_handler,
#endif
response->upgrade_handler = upgrade_handler;
response->upgrade_handler_cls = upgrade_handler_cls;
response->total_size = MHD_SIZE_UNKNOWN;
response->total_size = 0;
response->reference_count = 1;
if (MHD_NO ==
MHD_add_response_header (response,