exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 51647e6259e0492235720485a1f64ccef260b826
parent b0ba819cf41a3a13a84516d4fc6574277ba2ec96
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 19 Mar 2017 11:14:45 +0100

check return value from MHD_add_response_header()

Diffstat:
Msrc/exchange/taler-exchange-httpd_mhd.c | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_mhd.c b/src/exchange/taler-exchange-httpd_mhd.c @@ -112,9 +112,15 @@ TEH_MHD_handler_agpl_redirect (struct TEH_RequestHandler *rh, (void) MHD_add_response_header (response, MHD_HTTP_HEADER_CONTENT_TYPE, rh->mime_type); - MHD_add_response_header (response, - MHD_HTTP_HEADER_LOCATION, - "http://www.git.taler.net/?p=exchange.git"); + if (MHD_NO == + MHD_add_response_header (response, + MHD_HTTP_HEADER_LOCATION, + "http://www.git.taler.net/?p=exchange.git")) + { + GNUNET_break (0); + MHD_destroy_response (response); + return MHD_NO; + } ret = MHD_queue_response (connection, rh->response_code, response);