werkzeug.remove_entity_headers

werkzeug.remove_entity_headers(headers, allowed=('expires', 'content-location'))[source]

Remove all entity headers from a list or Headers object. This operation works in-place. Expires and Content-Location headers are by default not removed. The reason for this is RFC 2616 section 10.3.5 which specifies some entity headers that should be sent.

Changed in version 0.5: added allowed parameter.

Parameters:
  • headers – a list or Headers object.
  • allowed – a list of headers that should still be allowed even though they are entity headers.