Skip to content

Commit

Permalink
Remove block1 in error response.
Browse files Browse the repository at this point in the history
Fixes: issue #1937

Signed-off-by: Achim Kraus <[email protected]>
  • Loading branch information
Achim Kraus committed Mar 11, 2022
1 parent 642d224 commit 04484c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,7 @@ private void handleInboundBlockwiseUpload(final Exchange exchange, final Request
private void sendBlock1ErrorResponse(Block1BlockwiseStatus status, Exchange exchange, Request request,
ResponseCode errorCode, String message) {

BlockOption block1 = request.getOptions().getBlock1();
Response error = Response.createResponse(request, errorCode);
error.getOptions().setBlock1(block1.getSzx(), block1.isM(), block1.getNum());
error.setPayload(message);
clearBlock1Status(status);
lower().sendResponse(exchange, error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ public void testRandomAccessPUTAttemp() throws Exception {
Token tok = generateNextToken();

client.sendRequest(CON, PUT, tok, ++mid).path(RESOURCE_PATH).block1(2, true, 64).payload(reqtPayload.substring(2*64, 3*64)).go();
client.expectResponse(ACK, REQUEST_ENTITY_INCOMPLETE, tok, mid).block1(2, true, 64).go();
client.expectResponse(ACK, REQUEST_ENTITY_INCOMPLETE, tok, mid).go();
}

@Test
Expand Down

0 comments on commit 04484c2

Please sign in to comment.