mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
store basic auth in cache on redirect response
This commit is contained in:
parent
82e45a403f
commit
0bcd04d2ab
1 changed files with 2 additions and 1 deletions
|
@ -1017,7 +1017,8 @@ pub fn load<A, B>(load_data: &LoadData,
|
||||||
new_auth_header = None;
|
new_auth_header = None;
|
||||||
|
|
||||||
if let Some(auth_header) = request_headers.get::<Authorization<Basic>>() {
|
if let Some(auth_header) = request_headers.get::<Authorization<Basic>>() {
|
||||||
if response.status().class() == StatusClass::Success {
|
if response.status().class() == StatusClass::Success ||
|
||||||
|
response.status().class() == StatusClass::Redirection {
|
||||||
let auth_entry = AuthCacheEntry {
|
let auth_entry = AuthCacheEntry {
|
||||||
user_name: auth_header.username.to_owned(),
|
user_name: auth_header.username.to_owned(),
|
||||||
password: auth_header.password.to_owned().unwrap(),
|
password: auth_header.password.to_owned().unwrap(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue