warp
warp copied to clipboard
Add option to ignore content-length with multipart body
The current implementation of multipart::form
requires that the Content-Length
header exists. However, there are valid situations where this is not the case, for example when Transfer-Encoding
header is present. See e.g. RFC2616, section 4.4.
This PR adds an option to not check the content length, thus allowing the multipart::form
filter to be used in cases where Content-Length
header is not present. The change does not break the existing API.
Hi, thanks for your interest! and sorry for the delay. I think this should rather be part of https://github.com/seanmonstar/warp/pull/846/ what do you think?
Hi, thanks for your interest! and sorry for the delay.
No problem. Hope this proves useful to somebody else besides me. :)
I think this should rather be part of #846 what do you think?
I really have no strong preference one way or the other, though I do think of this as a separate feature to multipart being streamable. How would you suggest going forward with this? Edit: To be clear, I'm fine with this being combined into #846. Please let me know if this needs some action on my part.
Small bump as I was wondering what's taken to progress this as #846 is closed and multipart stuff in warp seems to have been redone recently but this feature still isn't present :eyes:
I now merged the changes from upstream master into this branch.
Looks good to me. But CI is complaining about code style.