Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

webapp2 in combination with WebOb 1.1 incorrectly sets a content type header in response to GET requests #39

Closed
GoogleCodeExporter opened this issue Feb 26, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Here is the code flow:
1. webapp2.Request.__init__ doesn't see a charset in the Content-Type header so 
it sets charset='UTF-*'
2. webob.BaseRequest.__init__ has this logic:
        if charset is not NoDefault:
            self.charset = charset
3. webob.BaseRequest._charset__set has this logic:

        ...
        content_type = self.environ.get('CONTENT_TYPE', '')
        ...
        self.environ['CONTENT_TYPE'] = content_type

So, if there is no Content-Type header, a new one is created with the value ' ; 
charset=UTF-8'

Original issue reported on code.google.com by bquin...@google.com on 14 Dec 2011 at 4:53

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision d36c461b86ba.

Original comment by rodrigo.moraes on 31 Jan 2012 at 6:18

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant