camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1426474 - /camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
Date Fri, 28 Dec 2012 11:52:37 GMT
Author: davsclaus
Date: Fri Dec 28 11:52:37 2012
New Revision: 1426474

URL: http://svn.apache.org/viewvc?rev=1426474&view=rev
Log:
Set header filter strategy like the others does.

Modified:
    camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java

Modified: camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java?rev=1426474&r1=1426473&r2=1426474&view=diff
==============================================================================
--- camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
(original)
+++ camel/trunk/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletComponent.java
Fri Dec 28 11:52:37 2012
@@ -27,6 +27,7 @@ import org.apache.camel.component.http.H
 import org.apache.camel.component.http.HttpClientConfigurer;
 import org.apache.camel.component.http.HttpComponent;
 import org.apache.camel.component.http.HttpConsumer;
+import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
@@ -71,13 +72,18 @@ public class ServletComponent extends Ht
         Boolean matchOnUriPrefix = getAndRemoveParameter(parameters, "matchOnUriPrefix",
Boolean.class);
         String servletName = getAndRemoveParameter(parameters, "servletName", String.class,
getServletName());
         String httpMethodRestrict = getAndRemoveParameter(parameters, "httpMethodRestrict",
String.class);
+        HeaderFilterStrategy headerFilterStrategy = resolveAndRemoveReferenceParameter(parameters,
"headerFilterStrategy", HeaderFilterStrategy.class);
 
         // restructure uri to be based on the parameters left as we dont want to include
the Camel internal options
         URI httpUri = URISupport.createRemainingURI(new URI(UnsafeUriCharactersEncoder.encode(uri)),
parameters);
 
         ServletEndpoint endpoint = createServletEndpoint(uri, this, httpUri, params, getHttpConnectionManager(),
configurer);
         endpoint.setServletName(servletName);
-        setEndpointHeaderFilterStrategy(endpoint);
+        if (headerFilterStrategy != null) {
+            endpoint.setHeaderFilterStrategy(headerFilterStrategy);
+        } else {
+            setEndpointHeaderFilterStrategy(endpoint);
+        }
 
         // prefer to use endpoint configured over component configured
         if (binding == null) {



Mime
View raw message