diff options
author | therealbobo | 2020-09-11 16:00:19 +0000 |
---|---|---|
committer | therealbobo | 2020-09-11 16:00:19 +0000 |
commit | 55806495242672ccf18e6bd96a73956bce61366f (patch) | |
tree | 7d9cc232558508daac7bc4136ba65d3b20cade44 /connection_streams_controller.go | |
parent | 1e8a07f770c85a2ed6159798d1fb00dbebe08e98 (diff) |
added support to http response body decoding
Diffstat (limited to 'connection_streams_controller.go')
-rw-r--r-- | connection_streams_controller.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/connection_streams_controller.go b/connection_streams_controller.go index 251e842..000e3d4 100644 --- a/connection_streams_controller.go +++ b/connection_streams_controller.go @@ -110,9 +110,15 @@ func (csc ConnectionStreamsController) GetConnectionPayload(c context.Context, c } size := uint64(end - start) + content := DecodeBytes(serverStream.Payload[start:end], format.Format) + // check if is encoded + if format.Format == "default" { + content = DecodeHttpResponse(content) + } + payload = Payload{ FromClient: false, - Content: DecodeBytes(serverStream.Payload[start:end], format.Format), + Content: content, Index: start, Timestamp: serverStream.BlocksTimestamps[serverBlocksIndex], IsRetransmitted: serverStream.BlocksLoss[serverBlocksIndex], |