diff options
Diffstat (limited to 'connection_streams_controller.go')
-rw-r--r-- | connection_streams_controller.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/connection_streams_controller.go b/connection_streams_controller.go index 251e842..096210e 100644 --- a/connection_streams_controller.go +++ b/connection_streams_controller.go @@ -27,6 +27,7 @@ type PatternSlice [2]uint64 type Payload struct { FromClient bool `json:"from_client"` Content string `json:"content"` + DecodedContent string `json:"decoded_content"` Index int `json:"index"` Timestamp time.Time `json:"timestamp"` IsRetransmitted bool `json:"is_retransmitted"` @@ -92,6 +93,7 @@ func (csc ConnectionStreamsController) GetConnectionPayload(c context.Context, c payload = Payload{ FromClient: true, Content: DecodeBytes(clientStream.Payload[start:end], format.Format), + //Request: ReadRequest(content), Index: start, Timestamp: clientStream.BlocksTimestamps[clientBlocksIndex], IsRetransmitted: clientStream.BlocksLoss[clientBlocksIndex], @@ -110,9 +112,15 @@ func (csc ConnectionStreamsController) GetConnectionPayload(c context.Context, c } size := uint64(end - start) + content := DecodeBytes(serverStream.Payload[start:end], format.Format) + + plainContent := DecodeBytes(serverStream.Payload[start:end], "default") + decodedContent := DecodeBytes([]byte(DecodeHttpResponse(plainContent)), format.Format) + payload = Payload{ FromClient: false, - Content: DecodeBytes(serverStream.Payload[start:end], format.Format), + Content: content, + DecodedContent: decodedContent, Index: start, Timestamp: serverStream.BlocksTimestamps[serverBlocksIndex], IsRetransmitted: serverStream.BlocksLoss[serverBlocksIndex], |