smolnar82 commented on code in PR #841: URL: https://github.com/apache/knox/pull/841#discussion_r1495856838
########## gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/DefaultHttpClientFactory.java: ########## @@ -369,4 +374,12 @@ private static long parseTimeout( String s ) { Period p = Period.parse( s, f ); return p.toStandardDuration().getMillis(); } + + private static String getCookieSpec(FilterConfig filterConfig) { + GatewayConfig globalConfig = + (GatewayConfig)filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE); + return globalConfig != null Review Comment: This will always return the gateway-level value (very likely `null`) even if `httpclient.cookieSpec` is set on the topology level. Based on the other helper methods here (`getMaxConnections`, `getConnectionTimeout`, `getSocketTimeout`,...) you should change this to check if `httpclient.cookieSpec` is set in the topology and default to the GatewayConfig value otherwise. You may also want to refactor that code out to some private method to avoid boilerplate private methods. -- 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: dev-unsubscr...@knox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org