Richard Whitehouse
79d11d7129
[Rust Server] Fix panic handling headers ( #4877 )
...
[Rust Server] Fix panic handling headers
If we have an API which has multiple auth types, we may panic. This is because
in Hyper 0.11, the following code will panic:
```
use hyper::header::{Authorization, Basic, Bearer, Headers};
fn main() {
let mut headers = Headers::default();
let basic = Basic { username: "richard".to_string(), password: None };
headers.set::<Authorization<Basic>>(Authorization(basic));
println!("Auth: {:?}", headers.get::<Authorization<Bearer>>());
}
```
as it mixes up an `Authorization<Basic>` and `Authorization<Bearer>` as both
have `Authorization:` as the header name.
This is fixed by using `swagger::SafeHeaders` added in
https://github.com/Metaswitch/swagger-rs/pull/90
2020-01-05 14:46:09 +00:00
..
2019-11-08 13:30:35 +00:00
2019-11-27 22:28:51 +01:00
2019-09-18 00:07:55 +08:00
2020-01-02 20:36:22 +08:00
2018-12-22 18:12:08 +08:00
2019-09-24 18:53:54 +08:00
2019-09-24 18:53:54 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-01-15 22:54:06 +08:00
2019-11-20 11:40:19 +08:00
2018-07-18 06:14:42 +02:00
2019-12-27 15:42:32 +08:00
2019-11-18 11:32:54 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-27 15:42:32 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2019-12-02 15:26:01 +08:00
2020-01-02 13:20:29 +08:00
2019-04-26 22:38:11 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2019-12-27 15:42:32 +08:00
2019-12-27 15:42:32 +08:00
2018-10-07 03:56:16 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2019-12-20 17:42:48 +08:00
2019-11-27 18:04:43 +08:00
2019-12-20 17:42:48 +08:00
2018-08-13 13:28:22 +08:00
2018-04-22 21:28:17 +02:00
2019-08-09 00:30:47 +08:00
2019-07-06 22:21:41 +08:00
2019-12-02 15:26:01 +08:00
2019-12-02 15:26:01 +08:00
2019-12-27 15:42:32 +08:00
2019-12-28 01:12:26 +08:00
2019-12-04 10:07:33 +08:00
2019-12-27 15:42:32 +08:00
2019-12-22 14:14:04 +08:00
2019-12-22 14:14:04 +08:00
2019-12-22 14:14:04 +08:00
2019-12-22 14:14:04 +08:00
2019-11-07 16:15:00 +08:00
2019-11-07 16:15:00 +08:00
2020-01-05 14:46:09 +00:00
2019-05-22 20:55:05 +09:00
2020-01-05 09:20:56 -05:00
2020-01-05 09:20:56 -05:00
2018-06-15 16:18:31 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2020-01-02 13:20:29 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00
2019-12-29 18:13:30 +08:00