MCPcopy Create free account
hub / github.com/06chaynes/http-cache / version_http

Function version_http

http-cache/src/test.rs:87–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86#[test]
87fn 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(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected