Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
weblog: HTTP/3 support (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Dec 30, 2023
1 parent 8f6023c commit 79303d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions modules/weblog/logline.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,8 @@ func isReqProtoValid(proto string) bool {
}

func isReqProtoVerValid(version string) bool {
if version == "1.1" {
return true
}
switch version {
case "1", "1.0", "2", "2.0":
case "1.1", "1", "1.0", "2", "2.0", "3", "3.0":
return true
}
return false
Expand Down
2 changes: 2 additions & 0 deletions modules/weblog/logline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ func TestLogLine_Assign(t *testing.T) {
{input: "HTTP/1.1", wantLine: logLine{web: web{reqProto: "1.1"}}},
{input: "HTTP/2", wantLine: logLine{web: web{reqProto: "2"}}},
{input: "HTTP/2.0", wantLine: logLine{web: web{reqProto: "2.0"}}},
{input: "HTTP/3", wantLine: logLine{web: web{reqProto: "3"}}},
{input: "HTTP/3.0", wantLine: logLine{web: web{reqProto: "3.0"}}},
{input: emptyStr, wantLine: emptyLogLine},
{input: hyphen, wantLine: emptyLogLine},
{input: "1.1", wantLine: emptyLogLine, wantErr: errBadReqProto},
Expand Down

0 comments on commit 79303d6

Please sign in to comment.