Also, phantomjs has access to all the information you want and the WebDriver API already has a capabilities negotiation facility.
[Edit] Don't forget that the original URL is the only one supplied by the client of the API. It may be incorrect for very different reasons than all the other resources included by the page itself. That's why it is justified to treat it as a special case.