gabrielfalcao / HTTPretty

Intercept HTTP requests at the Python socket level. Fakes the whole socket module

Home Page:https://httpretty.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request body isn't decoded when client specifies its charset

sergey-salnikov opened this issue · comments

While writing integration tests for an application that uses google-auth-oauthlib, I noticed that it sends requests to Google API with 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'. HTTPrettyRequest.parse_request_body isn't ready for the charset part (relevant source) and doesn't decode such a body.