Skip to content

Commit f1bad4e

Browse files
author
Matrix-X
committed
refact(kernal): add json format message parser with callback decode
1 parent 5e59356 commit f1bad4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/kernel/serverGuard.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ func (serverGuard *ServerGuard) isSafeMode(request *http.Request) bool {
415415
}
416416

417417
func (serverGuard *ServerGuard) requestDataType(request *http.Request) string {
418-
if strings.HasPrefix(request.Header.Get("Content-Type"), "text/xml") {
418+
if strings.HasPrefix(request.Header.Get("Content-Type"), "text/xml") ||
419+
strings.HasPrefix(request.Header.Get("Content-Type"), "application/xml") {
419420
// xml 格式
420421
return messages.DataTypeXML
421422
} else {

0 commit comments

Comments
 (0)