1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

use iota for more content-length insertions (#2050)

This commit is contained in:
Rob Ede
2021-03-07 19:29:02 +00:00
committed by GitHub
parent 880b863f95
commit ca69b6577e
8 changed files with 49 additions and 45 deletions

View File

@ -829,7 +829,7 @@ async fn client_basic_auth() {
.unwrap()
.to_str()
.unwrap()
== "Basic dXNlcm5hbWU6cGFzc3dvcmQ="
== format!("Basic {}", base64::encode("username:password"))
{
HttpResponse::Ok()
} else {
@ -840,7 +840,7 @@ async fn client_basic_auth() {
});
// set authorization header to Basic <base64 encoded username:password>
let request = srv.get("/").basic_auth("username", Some("password"));
let request = srv.get("/").basic_auth("username", "password");
let response = request.send().await.unwrap();
assert!(response.status().is_success());
}