Fix remove_entity_headers helper function (#1415)
* Fix `remove_entity_headers` helper function * Add test for `remove_entity_headers` helper function
This commit is contained in:
committed by
Stephen Sadowski
parent
096c44b910
commit
f7adc5f84c
@@ -128,6 +128,6 @@ def remove_entity_headers(headers, allowed=("content-location", "expires")):
|
||||
headers = {
|
||||
header: value
|
||||
for header, value in headers.items()
|
||||
if not is_entity_header(header) and header.lower() not in allowed
|
||||
if not is_entity_header(header) or header.lower() in allowed
|
||||
}
|
||||
return headers
|
||||
|
||||
Reference in New Issue
Block a user