You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2018/11/06 03:27:51 UTC
[camel] branch camel-2.21.x updated: [CAMEL-12911]gzip
Content-Encoding problems after upgrading to Jetty 9.4.12
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch camel-2.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.21.x by this push:
new d7f12b9 [CAMEL-12911]gzip Content-Encoding problems after upgrading to Jetty 9.4.12
d7f12b9 is described below
commit d7f12b9912e032248148afa256833fb8b5348514
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon Nov 5 20:41:45 2018 +0800
[CAMEL-12911]gzip Content-Encoding problems after upgrading to Jetty 9.4.12
(cherry picked from commit e0aba10ab4b792f21619e82a41e680b7cddc80ec)
Conflicts:
parent/pom.xml
(cherry picked from commit dff913741216e22c3cf930f2beeb9750c2ea462d)
---
.../org/apache/camel/component/jetty9/AttachmentHttpBinding.java | 7 +++++++
parent/pom.xml | 3 +--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java
index 7c51839..b72f0c6 100644
--- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java
+++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;
import org.apache.camel.Attachment;
+import org.apache.camel.Exchange;
import org.apache.camel.RuntimeCamelException;
import org.apache.camel.http.common.DefaultHttpBinding;
import org.apache.camel.http.common.HttpHelper;
@@ -76,6 +77,12 @@ final class AttachmentHttpBinding extends DefaultHttpBinding {
protected void populateRequestParameters(HttpServletRequest request, HttpMessage message) throws Exception {
//we populate the http request parameters without checking the request method
Map<String, Object> headers = message.getHeaders();
+ //remove Content-Encoding from request
+ if (request instanceof org.eclipse.jetty.server.Request) {
+ org.eclipse.jetty.server.Request jettyRequest = (org.eclipse.jetty.server.Request)request;
+ jettyRequest.getHttpFields().remove(Exchange.CONTENT_ENCODING);
+ }
+
Enumeration<?> names = request.getParameterNames();
while (names.hasMoreElements()) {
String name = (String)names.nextElement();
diff --git a/parent/pom.xml b/parent/pom.xml
index 977ba1a6..938b7b9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -384,8 +384,7 @@
<jersey-version>2.11</jersey-version>
<jetty6-bundle-version>6.1.26_4</jetty6-bundle-version>
<jetty92-version>9.2.22.v20170606</jetty92-version>
- <!-- Jetty 9.4.7 is buggy, do not use -->
- <jetty9-version>9.4.6.v20170531</jetty9-version>
+ <jetty9-version>9.4.12.v20180830</jetty9-version>
<jetty-version>${jetty9-version}</jetty-version>
<jetty-plugin-version>${jetty-version}</jetty-plugin-version>
<jetty-runner-groupId>org.eclipse.jetty</jetty-runner-groupId>