Skip to content

CONTENT_TYPE and CONTENT_LENGTH headers are incorrectly prepended with HTTP_ #13

Description

@mthaak

Bottle stores these two headers without the HTTP_ prefix (see https://github.com/bottlepy/bottle/blob/f9b1849db4dd724e36a93a1032be592193fba581/bottle.py#L2289). But boddle doesn't make this exception, see:

environ['HTTP_'+k] = v

Which means that this fails:

with boddle(headers={'Content-Type': 'application/json'}):
    content_type = bottle.request.headers['Content-Type'] # this line fails

Because the header is stored as HTTP_CONTENT_TYPE by boddle, but bottle looks for CONTENT_TYPE

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions