mudit-97 commented on a change in pull request #423:
URL: https://github.com/apache/knox/pull/423#discussion_r605890578
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/AbstractGatewayDispatch.java
##########
@@ -132,12 +134,22 @@ public void copyRequestHeaderFields(HttpUriRequest
outboundRequest,
outboundRequest.addHeader( name, value );
}
}
+
+ //If there are some headers to be appended, append them
+ Map<String, String> extraHeaders = getOutboundRequestAppendHeaders();
+ if(null != extraHeaders){
Review comment:
ack, used MapUtils.isNotEmpty
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/AbstractGatewayDispatch.java
##########
@@ -132,12 +134,22 @@ public void copyRequestHeaderFields(HttpUriRequest
outboundRequest,
outboundRequest.addHeader( name, value );
}
}
+
+ //If there are some headers to be appended, append them
+ Map<String, String> extraHeaders = getOutboundRequestAppendHeaders();
+ if(null != extraHeaders){
+ extraHeaders.keySet().forEach(header ->
outboundRequest.addHeader(header, extraHeaders.get(header)));
Review comment:
ack
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/AbstractGatewayDispatch.java
##########
@@ -132,12 +134,22 @@ public void copyRequestHeaderFields(HttpUriRequest
outboundRequest,
outboundRequest.addHeader( name, value );
}
}
+
+ //If there are some headers to be appended, append them
+ Map<String, String> extraHeaders = getOutboundRequestAppendHeaders();
Review comment:
ack
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/dispatch/ConfigurableDispatch.java
##########
@@ -41,13 +47,26 @@
public class ConfigurableDispatch extends DefaultDispatch {
private Set<String> requestExcludeHeaders =
super.getOutboundRequestExcludeHeaders();
private Set<String> responseExcludeHeaders =
super.getOutboundResponseExcludeHeaders();
+ private Map<String, String> requestAppendHeaders = new HashMap<>();
Review comment:
ack
--
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]