Skip to content

Commit

Permalink
[UNDERTOW-2060] fix double AJP response
Browse files Browse the repository at this point in the history
  • Loading branch information
aogburn authored and fl4via committed Jun 10, 2022
1 parent 5261e01 commit 1443a1a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class AjpReadListener implements ChannelListener<StreamSourceChannel> {
private static final byte[] CPONG = {'A', 'B', 0, 1, 9};
private static final byte[] SEND_HEADERS_INTERNAL_SERVER_ERROR_MSG = {'A', 'B', 0, 8, 4, (byte)((500 >> 8) & 0xFF) , (byte)(500 & 0xFF), 0, 0, '\0', 0, 0};
private static final byte[] SEND_HEADERS_BAD_REQUEST_MSG = {'A', 'B', 0, 8, 4, (byte)((400 >> 8) & 0xFF) , (byte)(400 & 0xFF), 0, 0, '\0', 0, 0};
private static final byte[] END_RESPONSE = {'A', 'B', 0, 2, 5, 1};
private static final byte[] END_RESPONSE = {'A', 'B', 0, 2, 5, 0};

private final AjpServerConnection connection;
private final String scheme;
Expand Down Expand Up @@ -235,7 +235,6 @@ public void handleEvent(AjpServerResponseConduit channel) {
if(oldState.badRequest) {
httpServerExchange.setStatusCode(StatusCodes.BAD_REQUEST);
httpServerExchange.endExchange();
handleBadRequest();
safeClose(connection);
} else {
Connectors.executeRootHandler(connection.getRootHandler(), httpServerExchange);
Expand Down

0 comments on commit 1443a1a

Please # to comment.