-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
Add option to ignore content-length with multipart body #919
Conversation
Hi, thanks for your interest! and sorry for the delay. I think this should rather be part of #846 what do you think? |
No problem. Hope this proves useful to somebody else besides me. :)
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? |
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 👀 |
# Conflicts: # src/filters/multipart.rs
I now merged the changes from upstream master into this branch. |
Looks good to me. But CI is complaining about code style. |
The current implementation of
multipart::form
requires that theContent-Length
header exists. However, there are valid situations where this is not the case, for example whenTransfer-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 whereContent-Length
header is not present. The change does not break the existing API.