Skip to content

Response object adding default_content_type is perhaps bad magic #205

@cdent

Description

@cdent

If a response is 304 or 204 or any of the other varieties with no body, then there should be no content-type header. WebOb doesn't respect this and instead will set the header to the value of Response.default_content_type.

Obviously this can be worked around in the code that uses Response (by setting a different default) however it seems that the default default behavior is incorrect.

Would it make sense to check status before choosing to use the default_content_type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions