Skip to content
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

Added naive content length to upload struct #5142

Merged
merged 10 commits into from
Nov 30, 2018

Conversation

RickeyWard
Copy link
Contributor

Content length provides context into the size of the upload, it's not the exact form body size because it's off by the request header and other request info, but it was already parsed by the library and provides little to no additional overhead to pass on for use in request handlers.
This allows you the opportunity to abort if the file will be too large, or approximate the upload percentage. The only impact of this change is extending the HTTPUpload struct by a size_t, and the one-time cost of assigning it.

content length provides context into the size of the upload, it's not
the exact form body size it's off by the request header info, but it was
already parsed by the library and provides little to no additional
overhead to pass on for use in request handlers.
@RickeyWard
Copy link
Contributor Author

What would it take to get this merged?

@earlephilhower earlephilhower added this to the 2.5.0 milestone Nov 29, 2018
@earlephilhower earlephilhower merged commit 8f28c88 into esp8266:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants