log failures by MHD_add_response_header

This commit is contained in:
Christian Grothoff 2019-06-04 00:08:22 +02:00
parent 6a1649f62f
commit fc95131ddf
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -175,16 +175,17 @@ TEH_RESPONSE_reply_json (struct MHD_Connection *connection,
return MHD_NO; return MHD_NO;
} }
TEH_RESPONSE_add_global_headers (resp); TEH_RESPONSE_add_global_headers (resp);
(void) MHD_add_response_header (resp, GNUNET_break (MHD_YES ==
MHD_HTTP_HEADER_CONTENT_TYPE, MHD_add_response_header (resp,
"application/json"); MHD_HTTP_HEADER_CONTENT_TYPE,
"application/json"));
if (MHD_YES == comp) if (MHD_YES == comp)
{ {
/* Need to indicate to client that body is compressed */ /* Need to indicate to client that body is compressed */
if (MHD_NO == if (MHD_NO ==
MHD_add_response_header (resp, MHD_add_response_header (resp,
MHD_HTTP_HEADER_CONTENT_ENCODING, MHD_HTTP_HEADER_CONTENT_ENCODING,
"deflate")) "deflate"))
{ {
GNUNET_break (0); GNUNET_break (0);
MHD_destroy_response (resp); MHD_destroy_response (resp);