Files
caddy/modules/caddyhttp
Muhammad Syafri, S.Kom 915793f6e0 caddyhttp: add {http.request.proto_name} placeholder for spec-compliant protocol names (#7782)
* caddyhttp: add {http.request.proto_name} placeholder for spec-compliant protocol names

{http.request.proto} exposes Go's raw http.Request.Proto field which
returns HTTP/2.0 and HTTP/3.0 for HTTP/2 and HTTP/3 respectively.
These strings are non-standard since the specs define them as HTTP/2
and HTTP/3.

To preserve backward compat (especially CGI/FastCGI expectations),
{http.request.proto} is kept as-is. A new {http.request.proto_name}
placeholder is introduced that normalises the version string to the
spec-defined form:
  HTTP/2.0 -> HTTP/2
  HTTP/3.0 -> HTTP/3
  all others returned unchanged

Closes #7734

* caddyhttp: Use ProtoMajor for proto_name normalization and update docs

---------

Co-authored-by: jalikajalika5 <105954036+jalikajalika5@users.noreply.github.com>
2026-06-04 11:03:19 -04:00
..
2026-05-29 11:37:17 -06:00
2026-05-29 11:37:17 -06:00