Author: ron.sigal(a)jboss.com
Date: 2009-08-17 22:19:25 -0400 (Mon, 17 Aug 2009)
New Revision: 5354
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-1145: Adds "remotingContentType" response header.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2009-08-18
02:19:04 UTC (rev 5353)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2009-08-18
02:19:25 UTC (rev 5354)
@@ -502,6 +502,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);
Show replies by date