caddy/modules/caddyhttp
PerryLink 520cbbbcd6 map: keep ExpandString's semantics for every reference
A "${...}" was only protected from the placeholder replacer when the
current expression defined that group, so "${2}" and "${missing}" came
out as a literal "$" instead of the empty string, and unbraced "$2",
"$missing" and "$1x" stayed literal instead of expanding to the empty
string. All of those are syntactically valid references and
regexp.ExpandString has always resolved them to the empty string.

Decide the overlap of the two syntaxes by syntax alone, not by the
capture groups of one expression: a "${" whose contents can be a
reference name is a reference and its brace is escaped for the replacer;
any other "${" is a literal dollar followed by a Caddy placeholder, so
"${http.request.method}" still expands to "$GET". Everything else is
passed through untouched for ExpandString.

Adds regressions for $2, $missing, ${2}, ${missing} and $1x.
2026-11-01 17:46:11 +08:00
..
caddyauth caddyauth: handle CRLF and unterminated hash-password input (#8227) 2026-10-16 22:29:54 +10:00
encode caddyhttp: optimise header access and fix encoding negotiation (#8025) 2026-10-29 23:19:50 +10:00
fileserver Merge commit from fork 2026-10-13 10:13:03 -06:00
headers headers: evaluate conditional defaults independently (#8217) 2026-10-16 22:32:44 +10:00
intercept intercept: fix misleading handle_response error for extra matcher args (#7871) 2026-07-12 09:16:34 +10:00
logging
map map: keep ExpandString's semantics for every reference 2026-11-01 17:46:11 +08:00
proxyprotocol
push
requestbody build: bump all dependencies - (Go 1.26 floor) (#8056) 2026-09-30 10:54:12 -06:00
reverseproxy caddyhttp: optimise header access and fix encoding negotiation (#8025) 2026-10-29 23:19:50 +10:00
rewrite Merge commit from fork 2026-09-14 12:50:44 -06:00
standard caddyhttp: mitigate slowloris via idle read/write deadlines (#7913) 2026-08-21 21:17:26 -06:00
templates templates: use the earliest front matter closing fence (#8259) 2026-10-20 17:07:07 +10:00
timeouts caddyhttp: only bound HTTP/2 body reads in flight with the idle timeout (#8125) 2026-10-06 07:47:14 +10:00
tracing tracing: fix BatchSpanProcessor goroutine leak on config reload (#7826) 2026-06-18 11:42:58 -06:00
app.go fastcgi: keep the php_fastcgi directory redirect on the same origin (#8285) 2026-10-28 09:45:37 +00:00
app_test.go caddyhttp: wait for servers from previous configs on exit (#8009) 2026-09-30 11:15:18 -06:00
autohttps.go
autohttps_test.go
caddyhttp.go
caddyhttp_test.go
celmatcher.go caddyhttp: Reject repeated expression matchers in a matcher set (#8183) 2026-10-11 06:50:29 +10:00
celmatcher_test.go caddyhttp: add CEL expression support to the tls matcher (#8088) 2026-10-24 08:01:24 -04:00
errors.go build: bump all dependencies - (Go 1.26 floor) (#8056) 2026-09-30 10:54:12 -06:00
errors_randstring_test.go caddyhttp: fix randString sameCase dictionary to match its docs (#7972) 2026-09-25 16:01:50 +00:00
http2listener.go
httpredirectlistener.go
idletimeout.go caddyhttp: let handler read deadlines cap the idle read timeout (#8284) 2026-10-29 23:22:59 +10:00
idletimeout_test.go caddyhttp: let handler read deadlines cap the idle read timeout (#8284) 2026-10-29 23:22:59 +10:00
incremental.go feat: implement the Incremental header field (RFC 10036) (#8020) 2026-10-02 20:59:34 -04:00
incremental_test.go feat: implement the Incremental header field (RFC 10036) (#8020) 2026-10-02 20:59:34 -04:00
invoke.go
ip_matchers.go chore(deps): bump cel-go and switch import to new url (#8030) 2026-09-17 04:09:23 +03:00
ip_range.go
logging.go httpcaddyfile: Add log_level directive for access logs (#8201) 2026-10-12 11:54:20 -04:00
logging_test.go caddyhttp: ignore case when matching hosts in logger_names (#8176) 2026-10-09 21:15:23 +00:00
marshalers.go
matchers.go caddyhttp: document CEL raw strings for regexp patterns (#8280) 2026-10-29 14:08:28 +01:00
matchers_test.go caddyhttp: fix path_regexp (MatchPathRE) Windows backslash bypass (#7858) 2026-07-11 08:37:44 +10:00
metrics.go build: bump all dependencies - (Go 1.26 floor) (#8056) 2026-09-30 10:54:12 -06:00
metrics_test.go
replacer.go fastcgi: keep the php_fastcgi directory redirect on the same origin (#8285) 2026-10-28 09:45:37 +00:00
replacer_test.go caddyhttp: keep absent optional placeholders empty (#8019) 2026-10-03 01:54:13 +00:00
responsematchers.go
responsematchers_test.go
responsewriter.go ci: fix exhaustive linting (#8238) 2026-10-17 19:49:32 +10:00
responsewriter_test.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
routes.go caddyhttp: skip matchers for satisfied route groups (#8189) 2026-10-11 06:50:13 +10:00
server.go caddyhttp: let handler read deadlines cap the idle read timeout (#8284) 2026-10-29 23:22:59 +10:00
server_bench_test.go caddyhttp, reverseproxy: experimental WebTransport passthrough (#7669) 2026-10-12 23:24:10 -04:00
server_test.go caddyhttp: let handler read deadlines cap the idle read timeout (#8284) 2026-10-29 23:22:59 +10:00
staticerror.go
staticresp.go caddyhttp: only replace known placeholders in respond headers (#8014) 2026-09-13 12:08:21 +10:00
staticresp_test.go caddyhttp: keep absent optional placeholders empty (#8019) 2026-10-03 01:54:13 +00:00
subroute.go
urlpatternmatcher.go chore(deps): bump cel-go and switch import to new url (#8030) 2026-09-17 04:09:23 +03:00
urlpatternmatcher_test.go caddyhttp: fix url_pattern authorization bypass via encoded-slash traversal (#7941) 2026-08-15 10:38:20 -06:00
vars.go caddyhttp: use errors.AsType for request body limit errors (#8090) 2026-09-30 13:50:42 -06:00
vars_test.go caddyhttp: surface 413 for oversized request body placeholders (#7969) 2026-09-25 22:27:19 +10:00