Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content-types that start with 'application/x-www-form-urlencoded' should not be treated as multi-part #18

Open
moocher opened this issue Jul 16, 2010 · 0 comments

Comments

@moocher
Copy link

moocher commented Jul 16, 2010

The request() method in the Client class in oauth2/__init__py has this statement:

is_multipart = method == 'POST' and headers.get('Content-Type', DEFAULT_CONTENT_TYPE) != DEFAULT_CONTENT_TYPE

This means that content-types like "application/x-www-form-urlencoded; charset=utf-8" will make is_multipart evaluate to True. Can it be changed to something like this please?

is_multipart = method == 'POST' and not headers.get('Content-Type', DEFAULT_CONTENT_TYPE).startswith(DEFAULT_CONTENT_TYPE)

Thanks

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

No branches or pull requests

2 participants