Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,12 @@ protected boolean restoreRequest(HttpRequest request, Session session)
ByteChunk body = saved.getBody();

if (body != null) {
request.replayPayload(body.getBytes());
byte[] tempData = body.getBytes();
// tempData is a buffer with reserved extra space
// we must keep only the valid data here
byte[] data = new byte[body.getLength()];
System.arraycopy(tempData, body.getStart(), data, 0, data.length);
request.replayPayload(data);

// If no content type specified, use default for POST
String savedContentType = saved.getContentType();
Expand Down