Author: ron.sigal(a)jboss.com
Date: 2009-08-26 15:38:14 -0400 (Wed, 26 Aug 2009)
New Revision: 5388
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-1145: Made use of new content type test optional.
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-26
19:37:42 UTC (rev 5387)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2009-08-26
19:38:14 UTC (rev 5388)
@@ -94,6 +94,8 @@
protected List protocolHandlers = new ArrayList();
protected String URIEncoding = null;
+
+ protected String useRemotingContentType = "false";
public CoyoteInvoker(InvokerLocator locator)
@@ -213,6 +215,17 @@
}
protocolHandlers.add(protocolHandler);
+
+ value = config.get(HTTPMetadataConstants.USE_REMOTING_CONTENT_TYPE);
+ if (value != null && value instanceof String)
+ {
+ useRemotingContentType = (String) value;
+ }
+ else
+ {
+ log.warn(HTTPMetadataConstants.USE_REMOTING_CONTENT_TYPE + " value
should be a String: " + value);
+ }
+ log.debug(this + " useRemotingContentType: " +
useRemotingContentType);
}
}
@@ -553,6 +566,7 @@
{
// must be POST or PUT
UnMarshaller unmarshaller = getUnMarshaller();
+ request.put(HTTPMetadataConstants.USE_REMOTING_CONTENT_TYPE,
useRemotingContentType);
Object obj = null;
if (unmarshaller instanceof VersionedUnMarshaller)
obj =
((VersionedUnMarshaller)unmarshaller).read(request.getInputStream(), request, version);