server: drop HTTP/1.1 h2c upgrade handling (#5436)

Use net/http Server.Protocols and the merged golib listener path instead of the deprecated h2c handler. Keep HTTP/1.1 and cleartext HTTP/2 prior-knowledge support, while intentionally dropping HTTP/1.1 Upgrade: h2c.
This commit is contained in:
fatedier
2026-07-22 19:55:42 +08:00
committed by GitHub
parent 7dc7be930e
commit f8fc3c6b1b
8 changed files with 156 additions and 11 deletions

View File

@@ -61,11 +61,6 @@ linters:
- legacy
- std-error-handling
rules:
# Keep h2c and HTTP/1.1 Upgrade:h2c compatibility until an explicit migration.
- linters:
- staticcheck
path: ^pkg/util/vhost/http\.go$
text: "^SA1019:"
- linters:
- errcheck
- maligned