Merge pull request #1013 from ethcore/ff-fix
Fixing Firefox authorization issues
This commit is contained in:
commit
0260e9322a
@ -68,6 +68,7 @@ impl Authorization for HttpBasicAuth {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Access {
|
||||
Granted,
|
||||
Denied,
|
||||
@ -151,7 +152,7 @@ impl server::Handler<HttpStream> for AuthRequiredHandler {
|
||||
fn on_response(&mut self, res: &mut server::Response) -> Next {
|
||||
res.set_status(StatusCode::Unauthorized);
|
||||
res.headers_mut().set_raw("WWW-Authenticate", vec![b"Basic realm=\"Parity\"".to_vec()]);
|
||||
Next::end()
|
||||
Next::write()
|
||||
}
|
||||
|
||||
fn on_response_writable(&mut self, _encoder: &mut Encoder<HttpStream>) -> Next {
|
||||
|
@ -45,7 +45,7 @@ impl server::Handler<HttpStream> for Redirection {
|
||||
fn on_response(&mut self, res: &mut server::Response) -> Next {
|
||||
res.set_status(StatusCode::MovedPermanently);
|
||||
res.headers_mut().set(header::Location(self.to_url.to_owned()));
|
||||
Next::end()
|
||||
Next::write()
|
||||
}
|
||||
fn on_response_writable(&mut self, _encoder: &mut Encoder<HttpStream>) -> Next {
|
||||
Next::end()
|
||||
|
Loading…
Reference in New Issue
Block a user