You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/11/26 07:47:39 UTC
[1/2] camel git commit: Added unit test
Repository: camel
Updated Branches:
refs/heads/master ff94895cc -> 29edb1392
Added unit test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/29edb139
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/29edb139
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/29edb139
Branch: refs/heads/master
Commit: 29edb1392b09e5f65c81b4e429c5ed7e31224d2c
Parents: 5f0fca4
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 26 07:22:20 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 26 07:22:30 2014 +0100
----------------------------------------------------------------------
.../src/test/java/org/apache/camel/util/FileUtilTest.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/29edb139/camel-core/src/test/java/org/apache/camel/util/FileUtilTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/FileUtilTest.java b/camel-core/src/test/java/org/apache/camel/util/FileUtilTest.java
index 89446e9..1f84aad 100644
--- a/camel-core/src/test/java/org/apache/camel/util/FileUtilTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/FileUtilTest.java
@@ -175,6 +175,12 @@ public class FileUtilTest extends TestCase {
}
}
+ public void testCompactWindowsStylePath() {
+ String path = "E:\\workspace\\foo\\bar\\some-thing\\.\\target\\processes\\2";
+ String expected = "E:\\workspace\\foo\\bar\\some-thing\\target\\processes\\2";
+ assertEquals(expected, FileUtil.compactPath(path, '\\'));
+ }
+
public void testCompactPathSeparator() {
assertEquals(null, FileUtil.compactPath(null, '\''));
assertEquals("..\\foo", FileUtil.compactPath("..\\foo", '\\'));
[2/2] camel git commit: CAMEL-8038: Fixed @UriPath
Posted by da...@apache.org.
CAMEL-8038: Fixed @UriPath
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5f0fca47
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5f0fca47
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5f0fca47
Branch: refs/heads/master
Commit: 5f0fca47b88b8191f8336e39f8060e5f700242a7
Parents: ff94895
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 26 07:22:14 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 26 07:22:30 2014 +0100
----------------------------------------------------------------------
.../netty4/http/NettyHttpConfiguration.java | 16 +++++++++++++++-
.../component/netty4/http/NettyHttpEndpoint.java | 10 +++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5f0fca47/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
index 19b10fc..39fe135 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
@@ -22,24 +22,38 @@ import java.util.List;
import io.netty.channel.ChannelHandler;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.component.netty4.NettyConfiguration;
-
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
/**
* Extended configuration for using HTTP with Netty.
*/
+@UriParams
public class NettyHttpConfiguration extends NettyConfiguration {
+ @UriParam
private boolean urlDecodeHeaders;
+ @UriParam(defaultValue = "true")
private boolean mapHeaders = true;
+ @UriParam(defaultValue = "false")
private boolean compression;
+ @UriParam(defaultValue = "true")
private boolean throwExceptionOnFailure = true;
+ @UriParam(defaultValue = "false")
private boolean transferException;
+ @UriParam(defaultValue = "false")
private boolean matchOnUriPrefix;
+ @UriParam(defaultValue = "false")
private boolean bridgeEndpoint;
+ @UriParam
private String path;
+ @UriParam(defaultValue = "false")
private boolean disableStreamCache;
+ @UriParam(defaultValue = "true")
private boolean send503whenSuspended = true;
+ @UriParam(defaultValue = "" + 1024 * 1024)
private int chunkedMaxContentLength = 1024 * 1024;
+ @UriParam(defaultValue = "true")
private boolean chunked = true;
public NettyHttpConfiguration() {
http://git-wip-us.apache.org/repos/asf/camel/blob/5f0fca47/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
index c11a72a..194ba7a 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
@@ -38,13 +38,15 @@ import org.slf4j.LoggerFactory;
/**
* HTTP based {@link NettyEndpoint}
*/
-@UriEndpoint(scheme = "netty4-http", consumerClass = NettyHttpConsumer.class)
+@UriEndpoint(scheme = "netty4-http", consumerClass = NettyHttpConsumer.class, label = "http")
public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStrategyAware {
private static final Logger LOG = LoggerFactory.getLogger(NettyHttpEndpoint.class);
private NettyHttpBinding nettyHttpBinding;
private HeaderFilterStrategy headerFilterStrategy;
@UriParam
+ private NettyHttpConfiguration configuration;
+ @UriParam(defaultValue = "false")
private boolean traceEnabled;
@UriParam
private String httpMethodRestrict;
@@ -122,6 +124,12 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
}
@Override
+ public void setConfiguration(NettyConfiguration configuration) {
+ super.setConfiguration(configuration);
+ this.configuration = (NettyHttpConfiguration) configuration;
+ }
+
+ @Override
public NettyHttpConfiguration getConfiguration() {
return (NettyHttpConfiguration) super.getConfiguration();
}