Skip to content

304 causes exception and 500 to be returned #56

Description

@binbrain

When IF-MODIFIED-SINCE HTTP header causes WebOb to set a 304 status code, bowerstatic as a tween causes an error because it tries to check the content. When it does so, it raises an exception which turns into a 500 instead of the 304. The 304 is supposed to be returned to the browser.

injector.py:

if response.content_type.lower() not in CONTENT_TYPES:

This throws an an exception.

AttributeError: 'NoneType' object has no attribute 'lower'

response.content_type has been set to empty since a 304 doesn't return content. I think if call sees a 304 it should just immediately return response.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions