Make referer() behave as expected.
Fix test
Merge pull request #3448 from dereuromark/master-controller

Controller::referer() and local URL