bug: multipart/formdata boundary is not set in header #3528
Unanswered
Anton-Shutik
asked this question in
General
Replies: 2 comments 1 reply
-
@tomchristie Would you mind taking a look at this one ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Well yes, if you send a request with a malformed header Content-Type header, then expect the server to not be able to decode the content. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having an issue while sending data with
"Content-Type": "multipart/form-data"
, while sending same data with"Content-Type": "multipart/form-data; boundary=WebKitFormBoundary7MA4YWxkTrZu0gW"
works fine.The boundary is added to the multipart stream anyways (if not provided in the
Content-type
header - it is autogenerated), but it also should be appended to the header itself, so server knows how to parse multipart stream.Take a look at full example:
Prints this:
Now, with the boundary (just switched them in headers dict) explicitly provided in the header. Works fine
Notice, that in the second case boundary is present in the header, while in the first isn't. I think this is a bug
Beta Was this translation helpful? Give feedback.
All reactions