Skip to content

Commit

Permalink
Move var
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Oct 16, 2023
1 parent 9b457d2 commit 36f6bb7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ public void channelRead0(ChannelHandlerContext ctx, DefaultHttpRequest msg) thro
try (ThreadContext.StoredContext ignore = threadPool.getThreadContext().stashContext()) {
injectUser(msg, threadContext);

boolean shouldSkipAuthentication = SecurityRestUtils.shouldSkipAuthentication(requestChannel);

// If request channel is completed and a response is sent, then there was a failure during authentication
restFilter.checkAndAuthenticateRequest(requestChannel);

Expand All @@ -91,6 +89,7 @@ public void channelRead0(ChannelHandlerContext ctx, DefaultHttpRequest msg) thro

requestChannel.getQueuedResponse().ifPresent(response -> ctx.channel().attr(EARLY_RESPONSE).set(response));

boolean shouldSkipAuthentication = SecurityRestUtils.shouldSkipAuthentication(requestChannel);
boolean shouldDecompress = !shouldSkipAuthentication && requestChannel.getQueuedResponse().isEmpty();

if (requestChannel.getQueuedResponse().isEmpty() || shouldSkipAuthentication) {
Expand Down

0 comments on commit 36f6bb7

Please sign in to comment.