Repository navigation
mod_lua: Close the connection after r:wsupgrade(), skip empty files in r:sendfile() - #1106
Merged
Merged
Conversation
connection after the request once upgraded. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
empty file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to #1022, needed before it can be backported: on 2.4.x,
test_lua_001_06_unmasked_framefails andtest_lua_002_02_growth[sendfile]spins.r:wsupgrade()now marks the connection for close once the 101 response has been sent, so it is closed whenever the script ends. Until now onlyr:wsclose()did that. Trunk's HTTP filters close the connection after a 101 anyway, but 2.4.x returns it to keepalive, where any further WebSocket frames would be read as an HTTP request.r:sendfile()of an empty file now returns 0 without passing a brigade. The 2.4.x core output filter holds every zero-length file bucket until the end of the request and sets them all aside again on each call, so repeated calls get slower and slower.Neither change is visible on trunk, so there is no new test and no changes entry; the existing
test/modules/luatests cover both once they reach 2.4.x.🤖 Generated with Claude Code