Skip to content

Commit 2f7ae73

Browse files
committed
Response: expose remove_header
From http_types::Response Useful for e.g. compression middleware where content-length is normally stripped.
1 parent 46aa4e0 commit 2f7ae73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/response.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ impl Response {
111111
self.res.len()
112112
}
113113

114+
/// Remove a header.
115+
pub fn remove_header(&mut self, name: &HeaderName) -> Option<Vec<HeaderValue>> {
116+
self.res.remove_header(name)
117+
}
118+
114119
/// Insert an HTTP header.
115120
pub fn set_header(
116121
mut self,

0 commit comments

Comments
 (0)