cetra3 / mpart-async

Asynchronous Multipart Requests for Rust
Apache License 2.0
32 stars 13 forks source link

Should be able to handle LF terminated Multipart Boundries #24

Open e-moran opened 1 year ago

e-moran commented 1 year ago

mpart-async currently returns an InvalidBoundry error if a multipart boundary uses the LF line terminator. While the HTTP Spec does call for CRLF terminated Multipart Boundries, it also state that applications should be tolerant where possible. I am currently writing an application that I would like to be tolerant in this regard, but have to work around this in mpart-async by replacing the line endings of the data that I provide to it.

I'm happy to submit a PR to make this change if you agree that it is something that you'd like to support.

cetra3 commented 1 year ago

Yes that is definitely something that we should support going forward. Happy for you to write a PR!

I don't know if I would want mixed \n and \r\n within the same request, I.e, it should use either one or the other.