summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_mhd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-23 18:47:07 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-23 18:47:07 +0100
commite8a88392da98c3325ba39b20901a5c220158d1f5 (patch)
treeb2e43949d8ec80d0a24a256479a67547e4a3730f /src/auditor/taler-auditor-httpd_mhd.c
parent8bca461ea9f604e4bce279255663f207f0d104ac (diff)
downloadexchange-e8a88392da98c3325ba39b20901a5c220158d1f5.tar.gz
exchange-e8a88392da98c3325ba39b20901a5c220158d1f5.tar.bz2
exchange-e8a88392da98c3325ba39b20901a5c220158d1f5.zip
more refactoring towards using libtalermhd
Diffstat (limited to 'src/auditor/taler-auditor-httpd_mhd.c')
-rw-r--r--src/auditor/taler-auditor-httpd_mhd.c40
1 files changed, 8 insertions, 32 deletions
diff --git a/src/auditor/taler-auditor-httpd_mhd.c b/src/auditor/taler-auditor-httpd_mhd.c
index 5f13691f..6613ddb0 100644
--- a/src/auditor/taler-auditor-httpd_mhd.c
+++ b/src/auditor/taler-auditor-httpd_mhd.c
@@ -28,6 +28,8 @@
#include <jansson.h>
#include <microhttpd.h>
#include <pthread.h>
+#include "taler_mhd_lib.h"
+#include "taler-auditor-httpd_responses.h"
#include "taler-auditor-httpd_responses.h"
#include "taler-auditor-httpd.h"
#include "taler-auditor-httpd_mhd.h"
@@ -94,38 +96,12 @@ TAH_MHD_handler_agpl_redirect (struct TAH_RequestHandler *rh,
const char *upload_data,
size_t *upload_data_size)
{
- const char *agpl =
- "This server is licensed under the Affero GPL. You will now be redirected to the source code.";
- struct MHD_Response *response;
- int ret;
-
- response = MHD_create_response_from_buffer (strlen (agpl),
- (void *) agpl,
- MHD_RESPMEM_PERSISTENT);
- if (NULL == response)
- {
- GNUNET_break (0);
- return MHD_NO;
- }
- TAH_RESPONSE_add_global_headers (response);
- if (NULL != rh->mime_type)
- (void) MHD_add_response_header (response,
- MHD_HTTP_HEADER_CONTENT_TYPE,
- rh->mime_type);
- if (MHD_NO ==
- MHD_add_response_header (response,
- MHD_HTTP_HEADER_LOCATION,
- "http://www.git.taler.net/?p=auditor.git"))
- {
- GNUNET_break (0);
- MHD_destroy_response (response);
- return MHD_NO;
- }
- ret = MHD_queue_response (connection,
- rh->response_code,
- response);
- MHD_destroy_response (response);
- return ret;
+ (void) rh;
+ (void) connection_cls;
+ (void) upload_data;
+ (void) upload_data_size;
+ return TALER_MHD_reply_agpl (connection,
+ "http://www.git.taler.net/?p=exchange.git");
}