Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Conversation

@flannelhead
Copy link

In a7c4dfb the signature of the method bool _sourceValid() of AsyncWebServerResponse was changed to bool _sourceValid() const. However, the change wasn't applied to all implementations (e.g. EventSource and WebSocket responses) and the method wouldn't be overridden, causing it to return the default value false. Consequently, for example WebSocket responses would fail with an Internal Server Error because the method didn't return true.

This PR fixes the implementations of AsyncWebServerResponse to match the prototype.

Copy link
Owner

@me-no-dev me-no-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@me-no-dev me-no-dev merged commit ea7b76b into me-no-dev:master Nov 28, 2016
vortigont pushed a commit to vortigont/ESPAsyncWebServer that referenced this pull request Nov 9, 2024
(feat) Add support for request attributes
willmmiles added a commit to willmmiles/ESPAsyncWebServer that referenced this pull request Mar 1, 2025
When accepting an upload, discard any bytes after Content-Length.  This
ensures that handlers such as AsyncJson can safely allocate the correct
sized buffer without needing to additionally check for overrun.

Fixes me-no-dev#100
willmmiles added a commit to Aircoookie/ESPAsyncWebServer that referenced this pull request Mar 1, 2025
When accepting an upload, discard any bytes after Content-Length.  This
ensures that handlers such as AsyncJson can safely allocate the correct
sized buffer without needing to additionally check for overrun.

Fixes me-no-dev#100
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants