-
Notifications
You must be signed in to change notification settings - Fork 90
Support chunked encoding in requests #377
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for HTTP chunked transfer encoding in incoming requests to the ESPAsyncWebServer library. This enables clients to send request bodies without knowing the total content length in advance, which is particularly useful for WebDAV operations and large file uploads.
Changes:
- Adds chunked transfer encoding parsing state machine to handle Transfer-Encoding: chunked requests
- Introduces support for the non-standard X-Expected-Entity-Length header used by macOS WebDAVFS
- Adds HTTP 507 "Insufficient Storage" status code for space-related errors
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/literals.h | Adds X-Expected-Entity-Length header constant and HTTP 507 status code string |
| src/ESPAsyncWebServer.h | Declares new member variables for chunk parsing state (_chunkStartIndex, _chunkOffset, _chunkSize, _chunkedParseState) and the _parseChunkedBytes method |
| src/WebRequest.cpp | Implements chunked encoding state machine, adds Transfer-Encoding header detection, initializes chunked state variables, and routes chunked requests through new parsing logic |
| examples/ChunkRequest/ChunkRequest.ino | Provides example demonstrating chunked PUT requests with file storage, including space checking and error handling |
| platformio.ini | Adds reference to the new ChunkRequest example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think it's ready for the next step. The remaining comments from Copilot don't seem worthwhile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Copilot is no longer complaining. |
Thanks a lot! |
|
@willmmiles @me-no-dev @vortigont : PR is good to go for me. Can one of you please add your review ? Thank you! |
willmmiles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, other than the subnet issues in the example.
No description provided.