moresandeep commented on a change in pull request #121: KNOX-1948 - If no rules are defined don't rewrite URL: https://github.com/apache/knox/pull/121#discussion_r307471018
########## File path: gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonUrlRewriteFilterReader.java ########## @@ -52,14 +52,19 @@ public JsonUrlRewriteFilterReader( @Override protected String filterValueString(String name, String value, String rule ) { - try { - Template input = Parser.parseLiteral( value ); - Template output = rewriter.rewrite( resolver, input, direction, rule ); - value = output.getPattern(); - } catch( URISyntaxException e ) { - LOG.failedToParseValueForUrlRewrite( value ); + if(rule != null || UrlRewriter.Direction.OUT == direction) { Review comment: sure, good idea ! ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services