aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_digestauth_sha256.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_digestauth_sha256.c')
-rw-r--r--src/testcurl/test_digestauth_sha256.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c
index 7f8ebcd5..fff3a1d7 100644
--- a/src/testcurl/test_digestauth_sha256.c
+++ b/src/testcurl/test_digestauth_sha256.c
@@ -95,10 +95,18 @@ ahc_echo (void *cls,
95 const char *realm = "test@example.com"; 95 const char *realm = "test@example.com";
96 enum MHD_Result ret; 96 enum MHD_Result ret;
97 int ret_i; 97 int ret_i;
98 static int already_called_marker;
98 (void) cls; (void) url; /* Unused. Silent compiler warning. */ 99 (void) cls; (void) url; /* Unused. Silent compiler warning. */
99 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ 100 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */
100 (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ 101 (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */
101 102
103 if (&already_called_marker != *req_cls)
104 { /* Called for the first time, request not fully read yet */
105 *req_cls = &already_called_marker;
106 /* Wait for complete request */
107 return MHD_YES;
108 }
109
102 username = MHD_digest_auth_get_username (connection); 110 username = MHD_digest_auth_get_username (connection);
103 if ( (username == NULL) || 111 if ( (username == NULL) ||
104 (0 != strcmp (username, "testuser")) ) 112 (0 != strcmp (username, "testuser")) )