moresandeep commented on a change in pull request #456:
URL: https://github.com/apache/knox/pull/456#discussion_r648517128



##########
File path: 
gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/dispatch/ConfigurableHADispatch.java
##########
@@ -224,7 +224,7 @@ private void setKnoxHaCookie(HttpServletRequest 
inboundRequest,
 
   protected void failoverRequest(HttpUriRequest outboundRequest, 
HttpServletRequest inboundRequest, HttpServletResponse outboundResponse, 
HttpResponse inboundResponse, Exception exception) throws IOException {
     /* check for a case where no fallback is configured */
-    if(stickySessionsEnabled && noFallbackEnabled) {
+    if(stickySessionsEnabled && noFallbackEnabled && 
inboundRequest.getCookies() != null) {

Review comment:
       That is a good point, there could be a chance that browser/client might 
send other cookies during the first request(which i did not think about). 
Checking for `stickySessionCookieName` cookie would make this more robust.




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

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


Reply via email to