davsclaus commented on a change in pull request #418: Fix #382 Support path
parameters in platform-http
URL: https://github.com/apache/camel-quarkus/pull/418#discussion_r345757021
##########
File path:
extensions/platform-http/runtime/src/main/java/org/apache/camel/quarkus/component/platform/http/runtime/QuarkusPlatformHttpConsumer.java
##########
@@ -336,19 +341,16 @@ static void populateCamelHeaders(
}
}
}
- }
- // TODO: figure out whether we need this or remove
- // // Create headers for REST path placeholder variables
- // Map<String, Object> predicateContextParams =
httpExchange.getAttachment(Predicate.PREDICATE_CONTEXT);
- // if (predicateContextParams != null) {
- // // Remove this as it's an unwanted artifact of our Undertow
predicate chain
- // predicateContextParams.remove("remaining");
- //
- // for (String paramName : predicateContextParams.keySet()) {
- // headersMap.put(paramName, predicateContextParams.get(paramName));
- // }
- // }
+ /* Path parameters */
+ for (Entry<String, String> en : ctx.pathParams().entrySet()) {
+ final String name = en.getKey();
+ final String value = en.getValue();
+ if (!headerFilterStrategy.applyFilterToExternalHeaders(name,
value, exchange)) {
Review comment:
Yeah if they are http context-path parameters then I dont see a reason for
letting the camel filter strategy have a chance to filter them out.
----------------------------------------------------------------
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]
With regards,
Apache Git Services