[JBoss JIRA] Created: (JBREM-1145) HTTPUnMarshaller shouldn't use the value of content-type to determine the type of an object
by Ron Sigal (JIRA)
HTTPUnMarshaller shouldn't use the value of content-type to determine the type of an object
-------------------------------------------------------------------------------------------
Key: JBREM-1145
URL: https://jira.jboss.org/jira/browse/JBREM-1145
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.2.3, 2.5.1 (Flounder)
Reporter: Ron Sigal
Assignee: Ron Sigal
Fix For: 2.5.2 (Flounder), 2.2.3.SP1
org.jboss.remoting.marshal.http.HTTPMarshaller and HTTPUnMarshaller treat Strings as a special case, to avoid the expense of serialization. However, HTTPUnMarshaller is using the metadata value of content-type to determine if an object is a string or not, and. as of JBREM-653 "allow user to set content-type for http responses", that doesn't work. The problem is that the ServerInvocationHandler can set the content-type to, say, text/html, but CoyoteInvoker wraps the result in and InvocationResponse, which gets serialized. On the other side, HTTPUnMarshaller sees "text/html" and tries to read the serialized InvocationResponse as a string.
One solution would be for Remoting to use its own metadata key, say "remoting-type" for the purposes of marshaling and unmarshaling.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBREM-1141) HTTPUnMarshaller should test for "non-text" content-type instead of "binary" content-type
by Ron Sigal (JIRA)
HTTPUnMarshaller should test for "non-text" content-type instead of "binary" content-type
-----------------------------------------------------------------------------------------
Key: JBREM-1141
URL: https://jira.jboss.org/jira/browse/JBREM-1141
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.2.3, 2.5.1 (Flounder)
Reporter: Ron Sigal
Assignee: Ron Sigal
Fix For: 2.5.2 (Flounder), 2.2.3.SP1
As an efficiency measure, org.jboss.marshal.http.HTTPUnMarshaller.read() incorporates special handling for strings to avoid serialization. However, there is a flaw in the logic.
HTTPUnMarshaller.read() calls isBinaryData() and calls super.read() if the return value is true. If the return value is false, then it processes the input as String data. Originally, this distinction worked because the only two types recognized were org.jboss.remoting..transport.web.WebUtil.HTML ("text/html") and WebUtil.BINARY ("application/octet-stream"). However, JBREM-653 "allow user to set content-type for http responses" allows the introduction of other content types.
Instead of testing for "application/octet-stream", HTTPUnMarshaller.read() should treat any content type that starts "text" as a String, and it should treat anything else as an object.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months