|Issue tags:||needs backport to D7|
This was discovered by Niklas Fiekas (please credit him on commit) while working on #1463656: Add a Drupal kernel; leverage HttpFoundation and HttpKernel, but is unrelated to that issue, so is being split out here.
This can be replicated locally by accessing a Drupal installation with a dirty URL ("/index.php" appended in the address bar after the base url), and from there running the XML-RPC tests. Doing so currently results in test failures with HEAD. Testbot is not catching this, because it runs tests with clean URLs.
The problem is code like this:
$url = url(NULL, array('absolute' => TRUE)) . 'core/xmlrpc.php';
This makes no sense. url() is used for generating URLs to Drupal paths or external URLs. It is not meant for generating a URL to a file. For that, $base_url must be used instead.