requests icon indicating copy to clipboard operation
requests copied to clipboard

Support for multipart/form-data boundary

Open virajkanwade opened this issue 4 years ago • 3 comments

If custom boundary is set in content-type header, use it.

Relates to issues: #1997 #3744 #621 #4740 #4589 #4554

virajkanwade avatar Jun 29 '20 19:06 virajkanwade

Shouldn't need adding another library for something which could easily be achieved in the base lib

virajkanwade avatar Jun 29 '20 19:06 virajkanwade

The library is in feature-freeze and this is the worst way to implement this. So many users copy headers out of their Chrome inspector without knowing what they mean and this has wildly undefined behaviour with the mix of other parameters a user might actually pass.

You're also breaking the guarantee of ordering with this PR for something that a third-party library does better.

sigmavirus24 avatar Jun 29 '20 20:06 sigmavirus24

@sigmavirus24

this has wildly undefined behaviour with the mix of other parameters a user might actually pass.

  • it is utilizing a function very similar to a function which already exists in the lib: get_encoding_from_headers
  • it is looking for specifically only 'boundary' param passed in the content-type header, nothing else.

Can you please help me understand why would this have wildly undefined behavior?

virajkanwade avatar Jun 29 '20 20:06 virajkanwade