Skip to content

Multi-wallet RPC URI parsing invalid when ending with a slash #11861

@jackycjh

Description

@jackycjh

Using the newer RPC access point for multi-wallet support as described https://bitcoincore.org/en/releases/0.15.0/#multi-wallet-support will not work if the URI ends with a slash ( / ).
In other words, all RPCs for multi-wallet would only work if the URI does not end with a slash.

Expected behavior:
Any RPC command (or by using curl ) should work for URI like http://username:password@127.0.0.1:8332/wallet/wallet.dat/ regardless of the ending slash.

Actual behavior:
An error will be return {"result":null,"error":{"code":-18,"message":"Requested wallet does not exist or is not loaded"},"id":"curltext"} even when the wallet name is valid.

  • http://username:password@127.0.0.1:8332/wallet/wallet.dat will work.

Reproduction steps:

  1. Run curl --data-binary '{"jsonrpc":"1.1","id":"curltext","method":"listreceivedbyaddress","params":[]}' -H 'content-type:text/plain;' http://username:password@127.0.0.1:8332/wallet/wallet.dat/

Found in Version: 0.15.1
OS: Windows 10 Pro with Ubuntu WSL (if this info matters)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions