aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_auth_parse.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-14 14:36:55 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2023-06-20 23:22:53 +0300
commit4e8e5e653d7862378e4f3522905e2f4b4ed4067b (patch)
tree1231117d7efe247381ef40f007bd81372f0c624d /src/microhttpd/test_auth_parse.c
parenteaf1fa0889e9f9621f115ad5f13084e693ddb981 (diff)
downloadlibmicrohttpd-4e8e5e653d7862378e4f3522905e2f4b4ed4067b.tar.gz
libmicrohttpd-4e8e5e653d7862378e4f3522905e2f4b4ed4067b.zip
Removed request line and headers processing old functions and variables
Diffstat (limited to 'src/microhttpd/test_auth_parse.c')
-rw-r--r--src/microhttpd/test_auth_parse.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/microhttpd/test_auth_parse.c b/src/microhttpd/test_auth_parse.c
index 8c11499b..459c8286 100644
--- a/src/microhttpd/test_auth_parse.c
+++ b/src/microhttpd/test_auth_parse.c
@@ -160,7 +160,7 @@ MHD_DLOG (const struct MHD_Daemon *daemon,
160 ...) 160 ...)
161{ 161{
162 (void) daemon; 162 (void) daemon;
163 if (NULL == conn.rq.last) 163 if (! conn.rq.client_aware)
164 { 164 {
165 fprintf (stderr, "Unexpected call of 'MHD_LOG(), format is '%s'.\n", 165 fprintf (stderr, "Unexpected call of 'MHD_LOG(), format is '%s'.\n",
166 format); 166 format);
@@ -169,7 +169,7 @@ MHD_DLOG (const struct MHD_Daemon *daemon,
169 "NULL" : (conn.rq.headers_received->value)); 169 "NULL" : (conn.rq.headers_received->value));
170 mhdErrorExit (); 170 mhdErrorExit ();
171 } 171 }
172 conn.rq.last = NULL; /* Clear the flag */ 172 conn.rq.client_aware = false; /* Clear the flag */
173 return; 173 return;
174} 174}
175 175
@@ -319,7 +319,7 @@ clean_AuthHeaders (void)
319 319
320 conn.read_buffer = NULL; 320 conn.read_buffer = NULL;
321 conn.write_buffer = NULL; 321 conn.write_buffer = NULL;
322 conn.rq.last = NULL; 322 conn.rq.client_aware = false;
323} 323}
324 324
325 325
@@ -338,15 +338,14 @@ expect_result_type_n (const char *hdr, size_t hdr_len,
338 int expect_log, 338 int expect_log,
339 unsigned int line_num) 339 unsigned int line_num)
340{ 340{
341 static char marker1[] = "Expected log call";
342 unsigned int ret; 341 unsigned int ret;
343 342
344 ret = 0; 343 ret = 0;
345 add_AuthHeader (hdr, hdr_len); 344 add_AuthHeader (hdr, hdr_len);
346 if (expect_log) 345 if (expect_log)
347 conn.rq.last = marker1; /* Use like a flag */ 346 conn.rq.client_aware = true; /* Use like a flag */
348 else 347 else
349 conn.rq.last = NULL; 348 conn.rq.client_aware = false;
350#ifdef BAUTH_SUPPORT 349#ifdef BAUTH_SUPPORT
351 if (MHD_TEST_AUTHTYPE_BASIC == expected_type) 350 if (MHD_TEST_AUTHTYPE_BASIC == expected_type)
352 { 351 {
@@ -394,7 +393,7 @@ expect_result_type_n (const char *hdr, size_t hdr_len,
394#endif /* DAUTH_SUPPORT */ 393#endif /* DAUTH_SUPPORT */
395 } 394 }
396#if defined(BAUTH_SUPPORT) && defined(DAUTH_SUPPORT) 395#if defined(BAUTH_SUPPORT) && defined(DAUTH_SUPPORT)
397 if (conn.rq.last) 396 if (conn.rq.client_aware)
398 { 397 {
399 fprintf (stderr, 398 fprintf (stderr,
400 "'Authorization' header parsing ERROR:\n" 399 "'Authorization' header parsing ERROR:\n"