RPC server will now accept and parse /api/v%d URLs. Any version other than one (/api/v1) will be rejected with 404 not found. URLs outside /api/v%d are ignored by this processing.
Code heavily inspired by one of cdhowie's commits from #431 which I then pared down quite a bit, and changed the URL portion thereof.
Credit for the base changes goes to cdhowie (from which I pared down and changed the code).
The API versioning logic, as I understand it from the satoshi days, was that we should simply change the API as needed, because bitcoin is not yet version 1.0. HOWEVER, the logic continued, we should not simply make breaking changes to RPC API willy nilly, simply because we can. The value of the change must outweight the pain of the change, in other words. Thus, adding new RPC calls was never a problem, but changing RPC calls was avoided.
I like cdhowie's approach sufficiently to think that there would be value in supporting "/api/v1" URL, to prepare for future versioning.
Understand, this is NOT a blanket endorsement of pull request #431 with all its changes. This is only designed to add some future proofing in a manner inspired by pull #431.