Browse Source

Add PATCH TRACE http method to sniffer (#1314)

ayanamist 4 years ago
parent
commit
80d92381af
1 changed files with 2 additions and 1 deletions
  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 (
 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")
 	errNotHTTPMethod = errors.New("not an HTTP method")
 )
 )