fix: process request body once at EOS and correct status/filter bugs - #91
Open
fzipi wants to merge 1 commit into
Open
fix: process request body once at EOS and correct status/filter bugs#91fzipi wants to merge 1 commit into
fzipi wants to merge 1 commit into
Conversation
- Move msc_process_request_body() into the handler phase (hook_request_late) instead of calling it per input-filter bucket - Register hook_request_late via ap_hook_handler (not fixups) and read the body with ap_setup_client_block()/ap_get_client_block() so the input filter runs; create the transaction context in hook_insert_filter if missing - Set r->status in addition to r->status_line so interventions return the configured HTTP status - Fix input_filter() calling ap_remove_output_filter() instead of ap_remove_input_filter() - Check apr_bucket_read() return value in output_filter() Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
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.
Summary
msc_process_request_body()into the handler phase (hook_request_late) and only buffering chunks in the input filterhook_request_lateviaap_hook_handler(notfixups) and read the body withap_setup_client_block()/ap_get_client_block()so the input filter actually runs; create the transaction context inhook_insert_filterif it doesn't exist yetr->statusin addition tor->status_lineso interventions return the configured HTTP status instead of a defaultinput_filter()callingap_remove_output_filter()instead ofap_remove_input_filter()apr_bucket_read()return value inoutput_filter()Test plan