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