feat: support tcp_check_http_method (#77)

This commit is contained in:
mzz
2023-05-13 15:38:28 +08:00
committed by GitHub
parent e5983f0833
commit bf1d296401
9 changed files with 62 additions and 29 deletions

View File

@ -8,6 +8,7 @@ package sniffing
import (
"bufio"
"bytes"
"github.com/daeuniverse/dae/common"
"strings"
"unicode"
)
@ -27,9 +28,7 @@ func (s *Sniffer) SniffHttp() (d string, err error) {
if !found {
return "", NotApplicableError
}
switch string(method) {
case "GET", "POST", "PUT", "PATCH", "DELETE", "COPY", "HEAD", "OPTIONS", "LINK", "UNLINK", "PURGE", "LOCK", "UNLOCK", "PROPFIND":
default:
if !common.IsValidHttpMethod(string(method)) {
return "", NotApplicableError
}