()
| 85 | |
| 86 | #[test] |
| 87 | fn update_headers_keeps_headers_with_unconvertible_values() -> Result<()> { |
| 88 | let url = Url::from_str("http://example.com")?; |
| 89 | let mut res = HttpResponse { |
| 90 | body: TEST_BODY.to_vec(), |
| 91 | headers: HttpHeaders::new(), |
| 92 | status: 200, |
| 93 | url, |
| 94 | version: HttpVersion::Http11, |
| 95 | metadata: None, |
| 96 | }; |
| 97 | res.headers |
| 98 | .insert("content-disposition".to_string(), "attachment".to_string()); |
| 99 | res.headers.insert("etag".to_string(), "\"old\"".to_string()); |
| 100 | let mut parts = |
| 101 | http::Response::builder().status(304).body(()).unwrap().into_parts().0; |
| 102 | parts.headers.insert( |
nothing calls this directly
no outgoing calls
no test coverage detected