reta commented on code in PR #2807:
URL: https://github.com/apache/cxf/pull/2807#discussion_r2651264365


##########
rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java:
##########
@@ -416,23 +416,24 @@ private boolean isWSAddressingReplyToSpecified(Exchange 
ex) {
         inMessage.put(Message.FIXED_PARAMETER_ORDER, isFixedParameterOrder());
         inMessage.put(Message.ASYNC_POST_RESPONSE_DISPATCH, Boolean.TRUE);
 
-        SecurityContext httpSecurityContext = new SecurityContext() {
+        final HttpServletRequest reqFromInMessage = 
(HttpServletRequest)exchange.getInMessage().get(HTTP_REQUEST);
+        final SecurityContext httpSecurityContext = new SecurityContext() {

Review Comment:
   @ffang some refactoring here: a number of `cxf-*-security` tests were 
failing due to logging change: apparently when `DefaultLogEventMapper` is 
called, the underlying HTTP request is already recycled and fails with NPE 
(https://github.com/jetty/jetty.project/issues/12080). To mitigate that, at 
least for `getUserPrincipal()` - capturing `principal` early.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to