mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-21 21:31:14 +07:00
feat: support tcp_check_http_method
(#77)
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user