Hi,
I've found a bug trying to integrate Piwik with Django via Python-piwik.
That one calls SitesManager.getJavascriptTag which is defined as
return self::getCurrentScheme().'://'.self::getCurrentHost(). self::getCurrentScriptPath();
However, on my server, getCurrentHost is sub.domain.tld and getCurrentScriptPath is /http://sub.domain.tld/piwik/ (with both those trailing slashes). So getJavascriptTag produces
http://sub.domain.tld/http://sub.domain.tld/piwik/
which obviously does not work.
This breaks the API.
Should be easy to fix
Greets
Additional information:
$_SERVER['REQUEST_URI'] is used and it contains
http://sub.domain.tld/piwik/?token_auth=[TOKENTOKENTOKEN]&idSite=1&method=SitesManager.getJavascriptTag&module=API&format=json
fixed in r2389 for #1451