aboutsummaryrefslogtreecommitdiff
path: root/stream_handler.go
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-10-11 19:49:40 +0000
committerEmiliano Ciavatta2020-10-11 19:49:40 +0000
commitbc989facca1f3381afed2f7c982da7784fad2327 (patch)
treea72b6c1015f476c9e22da522bd1e7a605d7cac66 /stream_handler.go
parentc21541a31fe45ba3a0bafca46415247f3837713e (diff)
[inconsistent] SearchOption validation checkpoint
Diffstat (limited to 'stream_handler.go')
-rw-r--r--stream_handler.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream_handler.go b/stream_handler.go
index 48dba34..f08bd70 100644
--- a/stream_handler.go
+++ b/stream_handler.go
@@ -22,6 +22,7 @@ import (
"github.com/flier/gohs/hyperscan"
"github.com/google/gopacket/tcpassembly"
log "github.com/sirupsen/logrus"
+ "strings"
"time"
)
@@ -176,6 +177,7 @@ func (sh *StreamHandler) storageCurrentDocument() {
ConnectionID: ZeroRowID,
DocumentIndex: len(sh.documentsIDs),
Payload: sh.buffer.Bytes(),
+ PayloadString: strings.ToValidUTF8(string(sh.buffer.Bytes()), ""),
BlocksIndexes: sh.indexes,
BlocksTimestamps: sh.timestamps,
BlocksLoss: sh.lossBlocks,