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