Upgrade deps
This commit is contained in:
@@ -26,7 +26,7 @@ gzip = ["flate2"]
|
||||
brotli = ["brotli-decompressor"]
|
||||
|
||||
[dependencies]
|
||||
base64 = "0.13"
|
||||
base64 = "0.21"
|
||||
cookie = { version = "0.16", default-features = false, optional = true}
|
||||
once_cell = "1"
|
||||
url = "2"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use base64::{prelude::BASE64_STANDARD, Engine};
|
||||
|
||||
use crate::error::{Error, ErrorKind};
|
||||
|
||||
/// Proxy protocol
|
||||
@@ -131,7 +133,7 @@ impl Proxy {
|
||||
|
||||
pub(crate) fn connect<S: AsRef<str>>(&self, host: S, port: u16) -> String {
|
||||
let authorization = if self.use_authorization() {
|
||||
let creds = base64::encode(format!(
|
||||
let creds = BASE64_STANDARD.encode(format!(
|
||||
"{}:{}",
|
||||
self.user.clone().unwrap_or_default(),
|
||||
self.password.clone().unwrap_or_default()
|
||||
|
||||
@@ -3,6 +3,7 @@ use std::io::{self, Write};
|
||||
use std::ops::Range;
|
||||
use std::time;
|
||||
|
||||
use base64::{prelude::BASE64_STANDARD, Engine};
|
||||
use log::debug;
|
||||
use url::Url;
|
||||
|
||||
@@ -87,7 +88,7 @@ impl Unit {
|
||||
if (!username.is_empty() || !password.is_empty())
|
||||
&& get_header(&headers, "authorization").is_none()
|
||||
{
|
||||
let encoded = base64::encode(format!("{}:{}", username, password));
|
||||
let encoded = BASE64_STANDARD.encode(format!("{}:{}", username, password));
|
||||
extra.push(Header::new("Authorization", &format!("Basic {}", encoded)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user