commit e0cc693c641b525de5b3ffed5893378a37fef7e3
parent 906d8aeaa0d8cfdb41c3094694d87a13f69308cf
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sat, 10 Aug 2024 15:23:45 +0200
force JSON use in testcase
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/challenger/challenger-httpd_common.c b/src/challenger/challenger-httpd_common.c
@@ -25,6 +25,7 @@
#define RFC_8959_PREFIX "secret-token:"
+// FIXME: enums would be nicer...
int
CH_get_output_type (struct MHD_Connection *connection)
{
@@ -203,8 +204,8 @@ TALER_MHD_redirect_with_oauth_status (
TALER_MHD_add_global_headers (response);
GNUNET_break (MHD_YES ==
MHD_add_response_header (response,
- MHD_HTTP_HEADER_CONTENT_TYPE,
- "text/plain"));
+ MHD_HTTP_HEADER_CONTENT_TYPE,
+ "text/plain"));
char *url;
char *enc_err;
char *enc_state;
diff --git a/src/challenger/test-challenger.sh b/src/challenger/test-challenger.sh
@@ -99,6 +99,7 @@ CLIENT_SCOPE="the-client-scope"
echo -n "Initiating user login..."
STATUS=$(curl "${BURL}/authorize/${NONCE}" \
-G \
+ -H "Accept: application/json" \
--data-urlencode "response_type=code" \
--data-urlencode "client_id=${CLIENT_ID}" \
--data-urlencode "redirect_uri=${REDIRECT_URI}" \
@@ -117,6 +118,7 @@ echo "OK"
echo -n "Initiating address submission..."
STATUS=$(curl "${BURL}/challenge/${NONCE}" \
-X POST \
+ -H "Accept: application/json" \
--data-urlencode "filename=${FILENAME}" \
-w "%{http_code}" -s -o $LAST_RESPONSE)