You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by tt...@apache.org on 2007/10/04 18:23:21 UTC
svn commit: r581959 - in
/incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http:
./ processors/
Author: tterm
Date: Thu Oct 4 09:23:11 2007
New Revision: 581959
URL: http://svn.apache.org/viewvc?rev=581959&view=rev
Log:
SM-1084 make configurable if CONTENT-TYPE is used as property from the normalized message or not
Modified:
incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
Modified: incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java?rev=581959&r1=581958&r2=581959&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java (original)
+++ incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java Thu Oct 4 09:23:11 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,7 +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 {
@@ -506,10 +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/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java?rev=581959&r1=581958&r2=581959&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java (original)
+++ incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfigurationMBean.java Thu Oct 4 09:23:11 2007
@@ -74,8 +74,4 @@
void setWantHeadersFromHttpIntoExchange(boolean wantHeadersFromHttpIntoExchange);
- boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest();
-
- void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest);
-
}
Modified: incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java?rev=581959&r1=581958&r2=581959&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java (original)
+++ incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java Thu Oct 4 09:23:11 2007
@@ -59,6 +59,15 @@
protected String soapAction;
protected BasicAuthCredentials basicAuthentication;
protected ProxyParameters proxy;
+ protected boolean wantContentTypeHeaderFromExchangeIntoHttpRequest;
+
+ public boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest() {
+ return wantContentTypeHeaderFromExchangeIntoHttpRequest;
+ }
+
+ public void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest) {
+ this.wantContentTypeHeaderFromExchangeIntoHttpRequest = wantContentTypeHeaderFromExchangeIntoHttpRequest;
+ }
/**
* @return the soapAction
Modified: incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java?rev=581959&r1=581958&r2=581959&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java (original)
+++ incubator/servicemix/branches/servicemix-3.1/deployables/bindingcomponents/servicemix-http/src/main/java/org/apache/servicemix/http/processors/ProviderProcessor.java Thu Oct 4 09:23:11 2007
@@ -141,7 +141,7 @@
}
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(Constants.HEADER_CONTENT_TYPE);
method.addRequestHeader(Constants.HEADER_CONTENT_TYPE, entity.getContentType());
}