[jboss-svn-commits] JBL Code SVN: r37488 - labs/jbossesb/branches/JBESB_4_10_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Sep 27 15:41:48 EDT 2011
Author: tcunning
Date: 2011-09-27 15:41:47 -0400 (Tue, 27 Sep 2011)
New Revision: 37488
Modified:
labs/jbossesb/branches/JBESB_4_10_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java
Log:
JBESB-3686
Add MESSAGE_BYTE_SIZE property so that we can enable alertLengthThreshold
on the httpgateway.
Modified: labs/jbossesb/branches/JBESB_4_10_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_10_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java 2011-09-27 13:07:08 UTC (rev 37487)
+++ labs/jbossesb/branches/JBESB_4_10_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/http/HttpMessageComposer.java 2011-09-27 19:41:47 UTC (rev 37488)
@@ -37,6 +37,7 @@
import org.apache.log4j.Logger;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.common.Environment;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.http.HttpContentTypeUtil;
import org.jboss.soa.esb.http.HttpHeader;
@@ -146,6 +147,9 @@
charset = Charset.forName(characterEncoding);
}
+ int size = bodyBytes.length;
+ message.getProperties().setProperty(Environment.MESSAGE_BYTE_SIZE, "" + size);
+
if(payloadAs == null) {
String contentType = request.getContentType();
@@ -250,6 +254,8 @@
if(outBytes.length > 0) {
response.getOutputStream().write(outBytes);
}
+
+ message.getProperties().setProperty(Environment.MESSAGE_BYTE_SIZE, "" + outBytes.length);
} catch (IOException e) {
throw new MessageDeliverException("Unexpected error when write the message to http response", e);
}
More information about the jboss-svn-commits
mailing list