Skip to content

mod_proxy_fcgi: Handle CGI Local Redirect Responses - #810

Open
arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-61430-fcgi-local-redirect
Open

arturobernalg wants to merge 1 commit into
apache:trunkfrom
arturobernalg:fix/httpd-61430-fcgi-local-redirect

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

mod_proxy_fcgi did not handle CGI Local Redirect Responses as required by RFC 3875 section 6.2.2. A FastCGI response containing only a local Location header was forwarded to the client instead of being processed as an internal redirect.

The change detects this response form, drains the FastCGI request normally, releases the backend connection, and performs the internal redirect afterwards.

Includes regression coverage for local redirects, query strings, POST/HEAD handling, backend connection reuse, external redirects, and normal FastCGI responses.

@arturobernalg
arturobernalg force-pushed the fix/httpd-61430-fcgi-local-redirect branch from 20defd4 to 83dafe1 Compare October 9, 2026 06:20
* modules/proxy/mod_proxy_fcgi.c (dispatch): Recognize a CGI Local
  Redirect Response (RFC 3875, 6.2.2), a Location with a local URI path
  and no other header, read the rest of the response and remember the URI.
  (fcgi_request_status): New, does the internal redirect once the
  connection to the backend has been released, like mod_proxy_scgi.

* test/modules/proxy/fcgi_faker.py, test_07_fcgi_local_redirect.py: New.
* test/modules/proxy/env.py: Load proxy_fcgi.
* docs/log-message-tags/next-number: Update.

PR: 61430
@arturobernalg
arturobernalg force-pushed the fix/httpd-61430-fcgi-local-redirect branch from 83dafe1 to 42259ac Compare October 9, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant