servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tt...@apache.org
Subject svn commit: r581955 - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http: HttpConfiguration.java HttpConfigurationMBean.java HttpEndpoint.java processors/ProviderProcessor.java
Date Thu, 04 Oct 2007 16:02:48 GMT
Author: tterm
Date: Thu Oct  4 09:02:44 2007
New Revision: 581955

URL: http://svn.apache.org/viewvc?rev=581955&view=rev
Log:
SM-1084 make configurable if CONTENT-TYPE is used as property from the normalized message
or not

Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java?rev=581955&r1=581954&r2=581955&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
Thu Oct  4 09:02:44 2007
@@ -125,8 +125,6 @@
      */
     private boolean wantHeadersFromHttpIntoExchange;
 
-    private boolean wantContentTypeHeaderFromExchangeIntoHttpRequest;
-
     /**
      * @return Returns the rootDir.
      * @org.apache.xbean.Property hidden="true"
@@ -387,22 +385,6 @@
         this.wantHeadersFromHttpIntoExchange = wantHeadersFromHttpIntoExchange;
     }
 
-     /**
-     *
-     * @return
-     */
-    public boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest() {
-        return wantContentTypeHeaderFromExchangeIntoHttpRequest;
-    }
-
-    /**
-     *
-     * @param wantContentTypeHeaderFromExchangeIntoHttpRequest
-     */
-    public void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest)
{
-        this.wantContentTypeHeaderFromExchangeIntoHttpRequest = wantContentTypeHeaderFromExchangeIntoHttpRequest;
-    }
-
     public void save() {
         setProperty(componentName + ".jettyThreadPoolSize", Integer.toString(jettyThreadPoolSize));
         setProperty(componentName + ".jettyConnectorClassName", jettyConnectorClassName);
@@ -418,8 +400,6 @@
         setProperty(componentName + ".proxyHost", proxyHost);
         setProperty(componentName + ".proxyPort", Integer.toString(proxyPort));
         setProperty(componentName + ".wantHeadersFromHttpIntoExchange", Boolean.toString(wantHeadersFromHttpIntoExchange));
-        setProperty(componentName + ".wantContentTypeHeaderFromExchangeIntoHttpRequest",
-                Boolean.toString(wantContentTypeHeaderFromExchangeIntoHttpRequest));
         if (rootDir != null) {
             File f = new File(rootDir, CONFIG_FILE);
             try {
@@ -507,11 +487,6 @@
         if (properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange") !=
null) {
             wantHeadersFromHttpIntoExchange =
                     Boolean.valueOf(properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange")).booleanValue();
-        }
-        if (properties.getProperty(componentName + ".wantContentTypeHeaderFromExchangeIntoHttpRequest")
!= null) {
-            wantContentTypeHeaderFromExchangeIntoHttpRequest =
-                    Boolean.valueOf(properties.getProperty(componentName
-                            + ".wantContentTypeHeaderFromExchangeIntoHttpRequest")).booleanValue();
         }
         return true;
     }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java?rev=581955&r1=581954&r2=581955&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
Thu Oct  4 09:02:44 2007
@@ -74,7 +74,4 @@
 
     void setWantHeadersFromHttpIntoExchange(boolean wantHeadersFromHttpIntoExchange);
 
-    boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest();
-
-    void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest);
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java?rev=581955&r1=581954&r2=581955&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
Thu Oct  4 09:02:44 2007
@@ -59,6 +59,15 @@
     protected BasicAuthCredentials basicAuthentication;
     protected ProxyParameters proxy;
     protected boolean synchronous;
+    protected boolean wantContentTypeHeaderFromExchangeIntoHttpRequest;
+
+    public boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest() {
+        return wantContentTypeHeaderFromExchangeIntoHttpRequest;
+    }
+
+    public void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest)
{
+        this.wantContentTypeHeaderFromExchangeIntoHttpRequest = wantContentTypeHeaderFromExchangeIntoHttpRequest;
+    }
 
     /**
      * @return the synchronous

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java?rev=581955&r1=581954&r2=581955&view=diff
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
Thu Oct  4 09:02:44 2007
@@ -129,7 +129,7 @@
         copyHeaderInformation(nm, method);
         RequestEntity entity = writeMessage(writer);
         // remove content-type header that may have been part of the in message
-        if (!getConfiguration().isWantContentTypeHeaderFromExchangeIntoHttpRequest()) {
+        if (!endpoint.isWantContentTypeHeaderFromExchangeIntoHttpRequest()) {
             method.removeRequestHeader(HEADER_CONTENT_TYPE);
             method.addRequestHeader(HEADER_CONTENT_TYPE, entity.getContentType());
         }



Mime
View raw message