mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
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:
@@ -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));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user