Prechádzať zdrojové kódy

Fix for http authentication

bel 9 rokov pred
rodič
commit
23266e11f4
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      src/civetweb.c
  2. 1 1
      test/public_server.c

+ 1 - 1
src/civetweb.c

@@ -5278,7 +5278,7 @@ open_auth_file(struct mg_connection *conn, const char *path, struct file *filep)
 			            &truncated,
 			            name,
 			            sizeof(name),
-			            "%.*s%s",
+			            "%.*s/%s",
 			            (int)(e - p),
 			            p,
 			            PASSWORDS_FILE_NAME);

+ 1 - 1
test/public_server.c

@@ -2136,7 +2136,7 @@ START_TEST(test_http_auth)
 	client_ri = mg_get_request_info(client_conn);
 	ck_assert(client_ri != NULL);
 
-	/* ck_assert_str_eq(client_ri->uri, "401"); */
+	ck_assert_str_eq(client_ri->uri, "401");
 	mg_close_connection(client_conn);
 
 	test_sleep(1);