Permalink
Browse files

Fix param replacement in page URL

  • Loading branch information...
jbonofre committed Mar 16, 2012
1 parent 25fa2cf commit 1dce2f8f2bfd609dc87e0690003da017d52f4dfc
@@ -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");
@@ -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();
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<mashup id="dummy">
+ <page url="http://www.example.com/login=%login%"/>
+
</mashup>

0 comments on commit 1dce2f8

Please sign in to comment.