Skip to content

Conversation

@MitchBradley
Copy link

No description provided.

Copy link

Copilot AI left a 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.

@MitchBradley
Copy link
Author

I think it's ready for the next step. The remaining comments from Copilot don't seem worthwhile.

Copy link

Copilot AI left a 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.

@MitchBradley
Copy link
Author

Copilot is no longer complaining.

@mathieucarbou
Copy link
Member

Copilot is no longer complaining.

Thanks a lot!

@mathieucarbou
Copy link
Member

@willmmiles @me-no-dev @vortigont : PR is good to go for me. Can one of you please add your review ? Thank you!

Copy link

@willmmiles willmmiles left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants