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.
Comment | File | Size | Author |
---|---|---|---|
#6 | drupal-1593670-6.patch | 2.79 KB | tim.plunkett |
drupal-xmlrpc-url.patch | 2.8 KB | effulgentsia | |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedRTBC'ing cause it's not my patch :)
Comment #2
fgmThis issue with paths to actual files was already discussed long ago, and the ability to use url() for files in cases like this was won't fixed at the time, so maybe we should check when it was reintroduced: the same may have been done elsewhere.
Comment #3
catchAh crap I'm still waking up this morning and forgot to credit Niklas Fiekas on commit, I'll try to make another mistake with another commit to correct this..
This is in 7.x too so needs a backport.
Comment #4
Crell CreditAttribution: Crell commentedIf you haven't pushed yet you can always commit --amend to fix it. :-)
Comment #5
catchNah I already pushed it before even starting to type the comment :(
Comment #6
tim.plunkettNeeded to be rerolled manually since every new line referred to '/core/xmlrpc.php'.
I grepped around for other instances to change, didn't see any.
Comment #7
Crell CreditAttribution: Crell commentedIs this even still relevant? xmlrpc isn't its own front controller anymore, so I suspect we can just close this.
Comment #8
mgifford6: drupal-1593670-6.patch queued for re-testing.
Comment #12
fgmHow can this commit exist on the 8.x branches which don't have the underlying XML-RPC code ? The files don't exist, and yet they show on git.drupal.org ? Looks like a bug.
http://cgit.drupalcode.org/drupal/tree/core/modules/system?h=8.3.x&id=39...
And this is a 2012 commit:
git show
commit 39f51caa8e750a6edf0ee8684a75a7a3d7cb8863
Author: catch
Date: Fri May 25 12:48:07 2012 +0900