Skip to content

Conversation

7-zete-7
Copy link

@7-zete-7 7-zete-7 commented Jul 5, 2025

Fixes #161 and #92

Extends the default ordering to what FrankenPHP had before php/frankenphp#832.

I suggest a more correct location for the vulcain directive — after encode.

The current location (before request_header), I guess, was chosen for more correct request processing (to interact with unmodified request headers). I cannot judge the necessity of this.

The proposed location (after encode) should solve the response encoding error. This location was also chosen to avoid re-processing of Link headers by the push directive.

Expected change in the directive location
 tracing

 map
 vars
 fs
 root
 log_append
 log_skip
 log_name

 header
 copy_response_headers # only in reverse_proxy's handle_response block
 request_body

 redir

 # incoming request manipulation
 method
 rewrite
 uri
 try_files

 # middleware handlers; some wrap responses
 basic_auth
 forward_auth
-vulcain
 request_header
 encode
+vulcain
 push
 intercept
 templates

 # special routing & dispatching directives
 invoke
 handle
 handle_path
 route

 # handlers that typically respond to requests
 abort
 error
 copy_response # only in reverse_proxy's handle_response block
 respond
 metrics
 reverse_proxy
 php_fastcgi
 file_server
 acme_server

See Caddy's default directive order

@CLAassistant
Copy link

CLAassistant commented Jul 5, 2025

CLA assistant check
All committers have signed the CLA.

@7-zete-7 7-zete-7 marked this pull request as draft July 5, 2025 07:15
@7-zete-7

This comment was marked as outdated.

@7-zete-7 7-zete-7 force-pushed the gh-161-order-clarification branch from ce8b6f7 to 74b38db Compare July 15, 2025 13:03
@7-zete-7 7-zete-7 marked this pull request as ready for review July 15, 2025 13:40
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.

Vulcain becomes a handler before encode
2 participants