aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-09 15:43:47 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-09 15:43:47 +0100
commitc03183d3e196645f955133867c0892c7f08769f5 (patch)
treebd6acec0d759bf4644b5ad484c0d6d79a373eab4 /src
parente4cfaf779ee43f32e7c9d3f3190279e02aa05702 (diff)
downloadgnunet-c03183d3e196645f955133867c0892c7f08769f5.tar.gz
gnunet-c03183d3e196645f955133867c0892c7f08769f5.zip
avoid assertions from adding headers that MHD deals with internally
Diffstat (limited to 'src')
-rw-r--r--src/gns/gnunet-gns-proxy.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index e21deabde..21451651d 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -1362,11 +1362,27 @@ create_mhd_response_from_s5r (struct Socks5Request *s5r)
1362 NULL != header; 1362 NULL != header;
1363 header = header->next) 1363 header = header->next)
1364 { 1364 {
1365 GNUNET_break (MHD_YES == 1365 if (0 == strcasecmp (header->type,
1366 MHD_add_response_header (s5r->response, 1366 MHD_HTTP_HEADER_CONTENT_LENGTH))
1367 header->type, 1367 continue; /* MHD won't let us mess with those, for good reason */
1368 header->value)); 1368 if ( (0 == strcasecmp (header->type,
1369 1369 MHD_HTTP_HEADER_TRANSFER_ENCODING)) &&
1370 ( (0 == strcasecmp (header->value,
1371 "identity")) ||
1372 (0 == strcasecmp (header->value,
1373 "chunked")) ) )
1374 continue; /* MHD won't let us mess with those, for good reason */
1375 if (MHD_YES !=
1376 MHD_add_response_header (s5r->response,
1377 header->type,
1378 header->value))
1379 {
1380 GNUNET_break (0);
1381 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1382 "Failed to add header `%s:%s'\n",
1383 header->type,
1384 header->value);
1385 }
1370 } 1386 }
1371 /* force connection to be closed after each request, as we 1387 /* force connection to be closed after each request, as we
1372 do not support HTTP pipelining (yet, FIXME!) */ 1388 do not support HTTP pipelining (yet, FIXME!) */