fix Mux bug not matching paths correctly; httpraw HTTP V1 naming applied

This commit is contained in:
Patricio Whittingslow
2026-07-30 16:40:44 -03:00
parent aa259d1efd
commit 9ff97f1808
18 changed files with 410 additions and 174 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ const (
// segSizes are the chunk sizes a request may be delivered in, index 0 meaning
// "all at once". Splitting a request mid-CRLF or before a colon is what drives
// [httpraw.Header.TryParse]'s resumption path. Entries may be appended, never
// [httpraw.HeaderV1.TryParse]'s resumption path. Entries may be appended, never
// changed: an existing index must keep splitting exactly as it does today.
var segSizes = [16]int{0, 1, 2, 3, 5, 7, 11, 16, 23, 37, 64, 101, 173, 256, 509, 1024}
@@ -152,7 +152,7 @@ func checkResponse(t *testing.T, written string) {
if !strings.Contains(written, "\r\n\r\n") {
t.Fatalf("header block never terminated: %q", written)
}
var resp httpraw.Header
var resp httpraw.HeaderV1
const asResponse = true
if err := resp.ParseBytes(asResponse, []byte(written)); err != nil {
t.Fatalf("response does not parse back: %s in %q", err, written)