jamesnetherton commented on code in PR #31272:
URL: https://github.com/apache/camel/pull/31272#discussion_r4771619177


##########
components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityHandler.java:
##########
@@ -69,6 +72,16 @@ public SalesforceSecurityHandler(SalesforceHttpClient 
httpClient) {
         this.maxContentLength = httpClient.getMaxContentLength();
     }
 
+    /**
+     * Marks a login or logout request of the session, which must not trigger 
another login: the session waits for the
+     * response while it holds the lock that login needs.
+     */
+    public static void markSessionRequest(Request request) {

Review Comment:
   `accept()` already casts every non-tunnel request to `HttpRequest`, so a 
change in Jetty's request type would fail there with a `ClassCastException`. 
The `instanceof` check is needed because `SalesforceSessionTest` uses mocked 
requests. Keeping it as is.
   
   On checking the attribute in `accept()`: we tried that. When `accept()` 
returns false for a 401, Jetty's own authentication handler takes the response 
and the caller gets status 0 instead of 401. The handler has to accept it and 
forward the reply.
   
   The `PubSubApiManualIT` change is already covered in the PR description, 
under Tests.
   
   _Claude Code on behalf of jamesnetherton_
   



-- 
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