Explorar o código

Add PATCH TRACE http method to sniffer (#1314)

ayanamist %!s(int64=4) %!d(string=hai) anos
pai
achega
80d92381af
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      common/protocol/http/sniff.go

+ 2 - 1
common/protocol/http/sniff.go

@@ -37,7 +37,8 @@ func (h *SniffHeader) Domain() string {
 }
 
 var (
-	methods = [...]string{"get", "post", "head", "put", "delete", "options", "connect"}
+	// refer to https://pkg.go.dev/net/http@master#pkg-constants
+	methods = [...]string{"get", "post", "head", "put", "delete", "options", "connect", "patch", "trace"}
 
 	errNotHTTPMethod = errors.New("not an HTTP method")
 )