mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 23:51:06 +01:00
Account for joining ':' in basic auth (#2)
This commit is contained in:
parent
488b7bf653
commit
67f0aceea6
@ -70,7 +70,7 @@ impl IntoHeaderValue for Basic {
|
||||
|
||||
fn try_into(self) -> Result<HeaderValue, <Self as IntoHeaderValue>::Error> {
|
||||
let mut credentials = BytesMut::with_capacity(
|
||||
self.username.len() + self.password.as_ref().map_or(0, |pwd| pwd.len())
|
||||
self.username.len() + 1 + self.password.as_ref().map_or(0, |pwd| pwd.len())
|
||||
);
|
||||
credentials.put(&self.username);
|
||||
credentials.put_u8(b':');
|
||||
|
Loading…
Reference in New Issue
Block a user