Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1331 from fl4via/UNDERTOW-2060
[UNDERTOW-2060] fix double AJP response
  • Loading branch information
ropalka committed Jun 13, 2022
2 parents 481d42e + eefae28 commit 7c5b3ab
Showing 1 changed file with 1 addition and 2 deletions.
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 7c5b3ab

Please sign in to comment.