1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-04-10 11:54:06 +00:00

Merge branch 'master' into rand-0-7

This commit is contained in:
Nikolay Kim 2019-07-01 09:36:55 +06:00 committed by GitHub
commit cba6224900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View file

@ -4,8 +4,11 @@
### Changed
* Always append a colon after username in basic auth
* Upgrade `rand` dependency version to 0.7
## [0.2.1] - 2019-06-05
### Added

View file

@ -115,7 +115,7 @@ impl ClientBuilder {
{
let auth = match password {
Some(password) => format!("{}:{}", username, password),
None => format!("{}", username),
None => format!("{}:", username),
};
self.header(
header::AUTHORIZATION,
@ -164,7 +164,7 @@ mod tests {
.unwrap()
.to_str()
.unwrap(),
"Basic dXNlcm5hbWU="
"Basic dXNlcm5hbWU6"
);
}

View file

@ -280,7 +280,7 @@ impl ClientRequest {
{
let auth = match password {
Some(password) => format!("{}:{}", username, password),
None => format!("{}", username),
None => format!("{}:", username),
};
self.header(
header::AUTHORIZATION,
@ -664,7 +664,7 @@ mod tests {
.unwrap()
.to_str()
.unwrap(),
"Basic dXNlcm5hbWU="
"Basic dXNlcm5hbWU6"
);
}

View file

@ -195,7 +195,7 @@ impl WebsocketsRequest {
{
let auth = match password {
Some(password) => format!("{}:{}", username, password),
None => format!("{}", username),
None => format!("{}:", username),
};
self.header(AUTHORIZATION, format!("Basic {}", base64::encode(&auth)))
}
@ -443,7 +443,7 @@ mod tests {
.unwrap()
.to_str()
.unwrap(),
"Basic dXNlcm5hbWU="
"Basic dXNlcm5hbWU6"
);
}