diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2024-03-20 12:34:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 12:34:06 +0200 |
commit | d5c100a92b268bf8f40e5dc4902f3d0aa546b531 (patch) | |
tree | 8f54dd1126db66ebd2ad525c8ec6b63e9571a7ab /src | |
parent | 954f91e504c7660ea4e1e1763afe9e4de89c404a (diff) |
go.d: weblog allow PURGE HTTP method (#17204)
Diffstat (limited to 'src')
-rw-r--r-- | src/go/collectors/go.d.plugin/modules/weblog/logline.go | 1 | ||||
-rw-r--r-- | src/go/collectors/go.d.plugin/modules/weblog/logline_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/weblog/logline.go b/src/go/collectors/go.d.plugin/modules/weblog/logline.go index 89a04d3e65..5a69593b97 100644 --- a/src/go/collectors/go.d.plugin/modules/weblog/logline.go +++ b/src/go/collectors/go.d.plugin/modules/weblog/logline.go @@ -538,6 +538,7 @@ func isReqMethodValid(method string) bool { "PRI", "PROPFIND", "PROPPATCH", + "PURGE", // not a standardized HTTP method "PUT", "REBIND", "REPORT", diff --git a/src/go/collectors/go.d.plugin/modules/weblog/logline_test.go b/src/go/collectors/go.d.plugin/modules/weblog/logline_test.go index 0a72d1c473..d3055863ab 100644 --- a/src/go/collectors/go.d.plugin/modules/weblog/logline_test.go +++ b/src/go/collectors/go.d.plugin/modules/weblog/logline_test.go @@ -167,6 +167,7 @@ func TestLogLine_Assign(t *testing.T) { {input: "PROPFIND", wantLine: logLine{web: web{reqMethod: "PROPFIND"}}}, {input: "MOVE", wantLine: logLine{web: web{reqMethod: "MOVE"}}}, {input: "SEARCH", wantLine: logLine{web: web{reqMethod: "SEARCH"}}}, + {input: "PURGE", wantLine: logLine{web: web{reqMethod: "PURGE"}}}, {input: emptyStr, wantLine: emptyLogLine}, {input: hyphen, wantLine: emptyLogLine}, {input: "GET no_version", wantLine: emptyLogLine, wantErr: errBadReqMethod}, |