Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix param replacement in page URL

  • Loading branch information...
commit 1dce2f8f2bfd609dc87e0690003da017d52f4dfc 1 parent 25fa2cf
@jbonofre authored
View
3  processor/src/main/java/org/apache/camel/processor/mashup/core/MashupProcessor.java
@@ -61,7 +61,8 @@ public void process(Exchange exchange) throws Exception {
LOGGER.trace("Replacing the headers in the URL");
String url = page.getUrl();
for (String header : in.getHeaders().keySet()) {
- url.replace("%" + header + "%", in.getHeader(header).toString());
+ LOGGER.trace("Replace %{}% with {}", header, in.getHeader(header).toString());
+ url = url.replace("%" + header + "%", in.getHeader(header).toString());
}
LOGGER.trace("Constructing the HTTP request");
View
1  processor/src/test/java/org/apache/camel/processor/mashup/core/TestMashupProcessor.java
@@ -17,6 +17,7 @@ public void process() throws Exception {
Message in = exchange.getIn();
in.setHeader("MASHUP_ID", "dummy");
in.setHeader("MASHUP_STORE", "target/test-classes/model");
+ in.setHeader("login", "user_test");
MashupProcessor mashupProcessor = new MashupProcessor();
View
2  processor/src/test/resources/model/dummy.xml
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<mashup id="dummy">
+ <page url="http://www.example.com/login=%login%"/>
+
</mashup>
Please sign in to comment.
Something went wrong with that request. Please try again.