Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base64 from 0.13 to 0.21 #283

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ssl = ["tiny_http/ssl"]
rustls = ["tiny_http/ssl-rustls"]

[dependencies]
base64 = "0.13"
base64 = "0.22"
brotli = { version = "3.3.2", optional = true }
chrono = { version = "0.4.19", default-features = false, features = ["clock"] }
filetime = "0.2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/input/basic_http_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! - In order to read a plain text body, see
//! [the `plain_text_body` function](fn.plain_text_body.html).

use base64;
use base64::{Engine as _, prelude::BASE64_STANDARD};
use Request;

/// Credentials returned by `basic_http_auth`.
Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn basic_http_auth(request: &Request) -> Option<HttpAuthCredentials> {
return None;
}

let authvalue = match split.next().and_then(|val| base64::decode(val).ok()) {
let authvalue = match split.next().and_then(|val| BASE64_STANDARD.decode(val).ok()) {
Some(v) => v,
None => return None,
};
Expand Down
4 changes: 2 additions & 2 deletions src/websocket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub use self::websocket::Message;
pub use self::websocket::SendError;
pub use self::websocket::Websocket;

use base64;
use base64::{Engine as _, prelude::BASE64_STANDARD};
use sha1_smol::Sha1;
use std::borrow::Cow;
use std::error;
Expand Down Expand Up @@ -246,5 +246,5 @@ fn convert_key(input: &str) -> String {
sha1.update(input.as_bytes());
sha1.update(b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");

base64::encode_config(&sha1.digest().bytes(), base64::STANDARD)
BASE64_STANDARD.encode(&sha1.digest().bytes())
}
Loading