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 2016/02/14 09:47:30 UTC
[3/3] camel git commit: Upgrade restlet
Upgrade restlet
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9778a6d1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9778a6d1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9778a6d1
Branch: refs/heads/master
Commit: 9778a6d1d708756ce45013e9ffd2ecc2c222e460
Parents: ed861b5
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Feb 14 09:40:55 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Feb 14 09:47:18 2016 +0100
----------------------------------------------------------------------
.../camel/component/restlet/DefaultRestletBinding.java | 11 +++++++++--
parent/pom.xml | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/9778a6d1/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 32cd8ae..1f6738e 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -376,10 +376,10 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
// special for certain headers
if (message.getEntity() != null) {
// arfg darn restlet you make using your api harder for end users with all this trick just to set those ACL headers
- if (header.equalsIgnoreCase(HeaderConstants.HEADER_ACCESS_CONTROL_ALLOW_CREDENTIAL)) {
+ if (header.equalsIgnoreCase(HeaderConstants.HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS)) {
Boolean bool = exchange.getContext().getTypeConverter().tryConvertTo(Boolean.class, value);
if (bool != null) {
- message.setAccessControlAllowCredential(bool);
+ message.setAccessControlAllowCredentials(bool);
}
return true;
}
@@ -417,6 +417,13 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
}
return true;
}
+ if (header.equalsIgnoreCase(HeaderConstants.HEADER_LOCATION)) {
+ String text = exchange.getContext().getTypeConverter().tryConvertTo(String.class, value);
+ if (text != null) {
+ message.setLocationRef(text);
+ }
+ return true;
+ }
if (header.equalsIgnoreCase(HeaderConstants.HEADER_EXPIRES)) {
if (value instanceof Calendar) {
message.getEntity().setExpirationDate(((Calendar) value).getTime());
http://git-wip-us.apache.org/repos/asf/camel/blob/9778a6d1/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index d62317b..130cc8e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -445,7 +445,7 @@
<reflections-bundle-version>0.9.10_3</reflections-bundle-version>
<regexp-bundle-version>1.4_1</regexp-bundle-version>
<rest-assured-version>2.7.0</rest-assured-version>
- <restlet-version>2.3.1</restlet-version>
+ <restlet-version>2.3.6</restlet-version>
<rhino-bundle-version>1.7R2_3</rhino-bundle-version>
<rhino-version>1.7R2</rhino-version>
<rome-bundle-version>1.0_3</rome-bundle-version>