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

Flask can't read multipart form boundaries from custom HTTP clients #1007

Closed
multimeric opened this issue Mar 23, 2014 · 3 comments
Closed

Comments

@multimeric
Copy link

I consistently get the error "TypeError: cannot concatenate 'str' and 'NoneType' objects" whenever I send a multipart form from anywhere that's not an HTML

.

For example AndroidQuery's, Apache HttpClient, and the Chrome Postman plugin all give this error.

Trace:
File "C:\Python27\lib\site-packages\werkzeug\formparser.py", line 382, in parse_lines
next_part = b'--' + boundary

@untitaker
Copy link
Contributor

Can you provide the headers of your request please?

@multimeric
Copy link
Author

As it turns out, I was setting the Content-Type manually in each of these cases, which meant the form boundaries weren't correct. You can safely ignore this.

@untitaker
Copy link
Contributor

Ok cool.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants