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 2020/03/25 18:46:18 UTC
[camel] branch master updated: CAMEL-14788: Jetty server OSGi
problem workaround. Requires Jetty 9.4.25 or better to not have OSGi
problem but Jetty is API incompatible in their 9.4.xx patches.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new ef9a9af CAMEL-14788: Jetty server OSGi problem workaround. Requires Jetty 9.4.25 or better to not have OSGi problem but Jetty is API incompatible in their 9.4.xx patches.
ef9a9af is described below
commit ef9a9affa784b897abaed366ee5bd5f3373e0d9d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Mar 25 19:45:46 2020 +0100
CAMEL-14788: Jetty server OSGi problem workaround. Requires Jetty 9.4.25 or better to not have OSGi problem but Jetty is API incompatible in their 9.4.xx patches.
---
.../org/apache/camel/component/jetty/JettyHttpComponent.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index 8e3f8bf..4e209f0 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -1143,8 +1143,13 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
camelServlet.setServletResolveConsumerStrategy(new HttpRestServletResolveConsumerStrategy());
//must make RFC7578 as default to avoid using the deprecated MultiPartInputStreamParser
- connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration()
- .setMultiPartFormDataCompliance(MultiPartFormDataCompliance.RFC7578);
+ try {
+ connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration()
+ .setMultiPartFormDataCompliance(MultiPartFormDataCompliance.RFC7578);
+ } catch (Throwable e) {
+ // ignore this due to OSGi problems
+ LOG.debug("Cannot set MultiPartFormDataCompliance to RFC7578 due to " + e.getMessage() + ". This exception is ignored.", e);
+ }
return camelServlet;
}