Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
xml-rpc system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 May 2009 at 22:44 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
moshe weitzman commentedAny page that returns a content type of text/xml in its http header will not get any junk appended. Thats what I hope would happen here. Hope that gives a pointer. See devel_shutdown_real().
Comment #2
thepanz commentedFollowing (http://drupal.org/node/742706#comment-3931628) I've further checked the devel_shutdown_real() function and its headers checks.
The issue here is that xmlrpc.php returns "Content-Type: text/html; charset=utf-8", breaking the XMLRPC call (tested also with the example_xmlrpc module). I think that Drupal is returning the xmlrpc POST call as html instead of XML (in the headers). For this reason I'm changinh this "feature request" into a "bug report" (with major priority).
Cheers
Comment #3
thepanz commentedI found out the issue core: the xmlrpc.php is setting HTTP headers using PHP header() function and not drupal_set_header() (see xmlrpc_server_output() function http://api.drupal.org/api/drupal/includes--xmlrpcs.inc/function/xmlrpc_s...). The latter is the one checked in Devel module.
My patch fixes this issue not editing xmlrpc.php, but checking instead the real HTTP headers sent.
It uses a PHP5 function, and falls back to drupal_get_headers if not on PHP5 environment.
Also the Content-Types have been edited: it's now an inclusive (html and xhtml contentes) list of allowed content types.
Regards
Comment #4
thepanz commentedComment #5
moshe weitzman commentedthanks for the patch. i tried inclusive for a while and that worked poorly. instead, please patch core to use drupal_set_header()
Comment #6
thepanz commentedI think that the "exclusive" filter is a bit complex to manage to exclude a full range of different Content-Types, in fact you're excluding well-format xHTML ("application/xhtml+xml") from the display of shutdown data.
I've re-opened this issue to move it to the Drupal projec. Even if I don't know how long will it take to be fixed, leaving the Drupal6+Devel combination to a XMLRPC fault :(
Regards
Comment #7
thepanz commentedFollowing Moshe suggestion, I'm providing a Drupal xml-rpc system patch for this issue, allowing xmlrpc sub-system to use drupal_set_header() function instead PHP header().
Regards
Comment #8
thepanz commentedComment #9
fgmThis should also have the utf8 encoding.
This should also add the utf8 charset.
Comment #10
fgm