Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit 78afc6e

Browse files
Michal GajdošGerrit Code Review
authored andcommitted
Merge "JERSEY-2543: ApplicationHandler.apply() always overrides the SecurityContext of the ContainerRequest"
2 parents 464990e + e248b1d commit 78afc6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,9 @@ public Future<ContainerResponse> apply(final ContainerRequest request,
929929
final FutureResponseWriter responseFuture =
930930
new FutureResponseWriter(request.getMethod(), outputStream, runtime.getBackgroundScheduler());
931931

932-
request.setSecurityContext(DEFAULT_SECURITY_CONTEXT);
932+
if (request.getSecurityContext() == null) {
933+
request.setSecurityContext(DEFAULT_SECURITY_CONTEXT);
934+
}
933935
request.setWriter(responseFuture);
934936

935937
handle(request);

0 commit comments

Comments
 (0)