fix(ext/http): restore special handling for '*' path in requests

This commit is contained in:
Bert Belder 2025-03-18 14:54:23 -07:00 committed by Ryan Dahl
parent 9ca9e77a44
commit add1a2611b

View file

@ -300,6 +300,11 @@ class InnerRequest {
const authority = this.#methodAndUri[1] ?? this.#context.fallbackHost;
const path = this.#methodAndUri[2];
// * is valid only for OPTIONS (RFC 9110, Section 9.3.7)
if (path === "*" && method === "OPTIONS") {
return (this.#urlValue = "*");
}
// CONNECT requires an authority
if (method === "CONNECT") {
return (this.#urlValue = this.#methodAndUri[1]);