| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…euse toRelativeUrl for :path)
…header validation' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Motivation:
sendHttp2Frames copies HTTP/1.1 headers into Http2Headers on every HTTP/2 request (hot path):
String-materializes each name, toLowerCase() per name, HashSet probe — plus a
path + "?" + query concat for :path.
Modification:
:path from Uri.toRelativeUrl() (pooled, byte-identical); copy via iteratorCharSequence() +
AsciiString.contentEqualsIgnoreCase against HttpHeaderNames, dropping HTTP2_EXCLUDED_HEADERS.
Still lowercases (validating DefaultHttp2Headers throws on uppercase) but allocation-free when
already lowercase. Adds wire + :path-equivalence tests; updates the JMH benchmark.
Result:
Behavior-preserving; ~1.17x faster, -24 B/op (JMH, JDK 11). Full CI matrix green.