diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-15 22:49:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-15 22:49:29 +0200 |
commit | 6cb072ec5f67c55ed624d46b427112fd5945f7f6 (patch) | |
tree | aa1e7a0b71558584b60b9b8f4b0b5b5b53fa910f | |
parent | 0baad4430c7f2ee596c05c0eae96b8dfabf7276e (diff) |
preparing to have /test handlers in build system
-rw-r--r-- | src/mint/taler-mint-httpd.c | 9 | ||||
-rw-r--r-- | src/mint/taler-mint-httpd_test.h | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c index 0a5d23275..caddd6130 100644 --- a/src/mint/taler-mint-httpd.c +++ b/src/mint/taler-mint-httpd.c @@ -34,6 +34,9 @@ #include "taler-mint-httpd_withdraw.h" #include "taler-mint-httpd_refresh.h" #include "taler-mint-httpd_keystate.h" +#if HAVE_DEVELOPER +#include "taler-mint-httpd_test.h" +#endif #include "taler_mintdb_plugin.h" /** @@ -194,6 +197,12 @@ handle_mhd_request (void *cls, &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, #if HAVE_DEVELOPER + { "/test", MHD_HTTP_METHOD_POST, "application/json", + NULL, 0, + &TMH_TEST_handler_test, MHD_HTTP_OK }, + { "/test", NULL, "text/plain", + "Only POST is allowed", 0, + &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, #endif { NULL, NULL, NULL, NULL, 0, 0 } diff --git a/src/mint/taler-mint-httpd_test.h b/src/mint/taler-mint-httpd_test.h index 4067b619b..342b67b82 100644 --- a/src/mint/taler-mint-httpd_test.h +++ b/src/mint/taler-mint-httpd_test.h @@ -37,10 +37,10 @@ * @return MHD result code */ int -TMH_DEPOSIT_handler_test (struct TMH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size); +TMH_TEST_handler_test (struct TMH_RequestHandler *rh, + struct MHD_Connection *connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size); #endif |