[jboss-svn-commits] JBL Code SVN: r25273 - labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/routing/http.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Feb 14 12:07:15 EST 2009


Author: mark.little at jboss.com
Date: 2009-02-14 12:07:15 -0500 (Sat, 14 Feb 2009)
New Revision: 25273

Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2193

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java	2009-02-14 14:51:22 UTC (rev 25272)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/routing/http/POSTHttpMethodFactory.java	2009-02-14 17:07:15 UTC (rev 25273)
@@ -68,23 +68,19 @@
         PostMethod method = new PostMethod(url.toString());
         try {
         	StringRequestEntity entity;
-        	
-        	if ((_contentType == null) && (_charset == null))
-        		entity = new StringRequestEntity(payloadProxy.getPayload(message).toString());
-        	else
+
+        	try
         	{
-        		try
-        		{
-        			entity = new StringRequestEntity(payloadProxy.getPayload(message).toString(), _contentType, _charset);
-        		}
-        		catch (final Exception ex)
-        		{
-        			IOException ioe = new IOException("Failed to create StringRequestEntity with specified content-type and charset");
-                    ioe.initCause(ex);
-                    throw ioe;
-        		}
+        		entity = new StringRequestEntity(payloadProxy.getPayload(message).toString(), _contentType, _charset);
         	}
-            method.setRequestEntity(new StringRequestEntity(payloadProxy.getPayload(message).toString()));
+        	catch (final Exception ex)
+        	{
+        		IOException ioe = new IOException("Failed to create StringRequestEntity with specified content-type and charset");
+        		ioe.initCause(ex);
+        		throw ioe;
+        	}
+
+        	method.setRequestEntity(new StringRequestEntity(payloadProxy.getPayload(message).toString()));
         } catch (MessageDeliverException e) {
             IOException ioe = new IOException("Failed to access message payload.");
             ioe.initCause(e);




More information about the jboss-svn-commits mailing list