This commit is contained in:
crusader 2018-09-03 23:44:50 +09:00
parent 245d807a5a
commit add118ce9d

View File

@ -45,6 +45,11 @@ func (m *ElasticSearchMatcher) Match(matchCtx *osm.MatchCtx, index int, packet *
str := string(packet.Bytes()) str := string(packet.Bytes())
hnb := strings.Split(str, "\r\n\r\n") hnb := strings.Split(str, "\r\n\r\n")
if nil == hnb || 2 > len(hnb) {
return osm.NotMatchedError()
}
header := hnb[0] header := hnb[0]
body := hnb[1] body := hnb[1]