Author: ron.sigal(a)jboss.com
Date: 2009-08-17 22:19:04 -0400 (Mon, 17 Aug 2009)
New Revision: 5353
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-1145: Adds "remotingContentType" response header.
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2009-08-18
02:18:17 UTC (rev 5352)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2009-08-18
02:19:04 UTC (rev 5353)
@@ -430,6 +430,15 @@
}
res.setContentType(responseContentType);
+ if (responseObject instanceof String)
+ {
+ res.addHeader(HTTPMetadataConstants.REMOTING_CONTENT_TYPE,
HTTPMetadataConstants.REMOTING_CONTENT_TYPE_STRING);
+ }
+ else
+ {
+ res.addHeader(HTTPMetadataConstants.REMOTING_CONTENT_TYPE,
HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING);
+ }
+
Marshaller marshaller = getMarshaller();
if (marshaller instanceof VersionedMarshaller)
((VersionedMarshaller) marshaller).write(responseObject,
response.getOutputStream(), version);