Bug 628 - XML-RPC calls with extended content type are misdirected
: XML-RPC calls with extended content type are misdirected
Status: RESOLVED FIXED
: Helma
Extensions
: CVS trunk
: All All
: P1 major
: 1.6.3
Assigned To:
: https://dev.helma.org/trac/helma/brow...
:
:
  Show dependency treegraph
 
Reported: 2008-06-12 21:03 by
Modified: 2008-10-20 13:16 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-06-12 21:03:05
In line 167 of helma/framework/RequestTrans.java [1] the checkXmlRpc() method
decides whether an action call is to be handled as XML-RPC by comparing the
Content-Type header of the HTTP request with the string "text/xml".

This will be alright in many cases, however, some applications and services are
sending an extended Content-Type header like "text/xml; charset=utf-8".

In this case the comparison fails and Helma is misdirecting such requests to
the wrong method, e.g. main_action() instead of main_action_xmlrpc().

Replacing line 167 with the following code could potentially fix this issue:

return "POST".equals(method) &&
request.getContentType().startsWith("text/xml");

--
[1]
https://dev.helma.org/trac/helma/browser/helma/helma/trunk/src/helma/framework/RequestTrans.java#L167
------- Comment #1 From 2008-06-12 21:28:12 -------
I first thought there is an easy work-around for this issue but it shows that
Helma drops the actual XML-RPC method name and thus, there is no chance to
re-establish the XML-RPC context from within the erroneously called generic
action. Increasing severity to major.
------- Comment #2 From 2008-06-13 22:49:35 -------
Thanks for the report, should be fixed in svn.