mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 00:06:04 +08:00
caddyhttp: Support respond
with HTTP 103 Early Hints (#5006)
* caddyhttp: Support sending HTTP 103 Early Hints This adds support for early hints in the static_response handler. * caddyhttp: Don't record 1xx responses
This commit is contained in:
@ -1121,6 +1121,22 @@ func (m MatchProtocol) Match(r *http.Request) bool {
|
||||
return r.TLS != nil
|
||||
case "http":
|
||||
return r.TLS == nil
|
||||
case "http/1.0":
|
||||
return r.ProtoMajor == 1 && r.ProtoMinor == 0
|
||||
case "http/1.0+":
|
||||
return r.ProtoAtLeast(1, 0)
|
||||
case "http/1.1":
|
||||
return r.ProtoMajor == 1 && r.ProtoMinor == 1
|
||||
case "http/1.1+":
|
||||
return r.ProtoAtLeast(1, 1)
|
||||
case "http/2":
|
||||
return r.ProtoMajor == 2
|
||||
case "http/2+":
|
||||
return r.ProtoAtLeast(2, 0)
|
||||
case "http/3":
|
||||
return r.ProtoMajor == 3
|
||||
case "http/3+":
|
||||
return r.ProtoAtLeast(3, 0)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user