RPC: strictly require HTTP URI "/" #2601

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:uri-validate changing 1 files +5 −0
  1. jgarzik commented at 2:46 PM on May 1, 2013: contributor

    Previously, JSON-RPC clients accessed URI "/", and the JSON-RPC server did not care about the URI at all, and would accept any URI as valid.

    Change the JSON-RPC server to require URI "/" for all current accesses.

    This changes enables the addition of future interfaces at different URIs, such as pull request #1982 which demonstrates HTTP REST wallet download.

    Or, a future, breaking change in JSON-RPC interface could be introduced by serving JSON-RPC calls from new URI "/v2/".

  2. RPC: strictly require HTTP URI "/"
    Previously, JSON-RPC clients accessed URI "/", and the JSON-RPC server
    did not care about the URI at all, and would accept any URI as valid.
    
    Change the JSON-RPC server to require URI "/" for all current accesses.
    
    This changes enables the addition of future interfaces at different
    URIs, such as pull request #1982 which demonstrates HTTP REST wallet
    download.
    
    Or, a future, breaking change in JSON-RPC interface could be introduced
    by serving JSON-RPC calls from new URI "/v2/".
    9f4976afe2
  3. jgarzik commented at 2:49 PM on May 1, 2013: contributor

    This was cherry-picked from #1982.

  4. BitcoinPullTester commented at 3:19 PM on May 1, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/9f4976afe2568a6dd4a4026292e91697bedda4b6 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  5. sipa commented at 3:28 PM on May 1, 2013: member

    ACK.

  6. sipa commented at 6:12 PM on May 1, 2013: member

    If we ever revamp the RPC interface, I'd suggest a stronger separation between modules, like /rpc/v$VERSION/{wallet/$WALLETNAME}, blockchain, network, misc}, for example.

  7. luke-jr commented at 9:17 PM on May 1, 2013: member

    @sipa In that case, this patch would break clients trying to use /rpc/v0/blah

    Perhaps an alternative to / should be allowed within some criteria?

  8. gavinandresen commented at 6:59 PM on May 2, 2013: contributor

    ACK. Tested with the python and curl examples on our JSON-RPC wiki page.

  9. jgarzik referenced this in commit d9dd0318e1 on May 2, 2013
  10. jgarzik merged this on May 2, 2013
  11. jgarzik closed this on May 2, 2013

  12. laudney referenced this in commit 8ac265a281 on Mar 19, 2014
  13. jgarzik deleted the branch on Aug 24, 2014
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me