diff options
| author | Pieter Wuille <[email protected]> | 2017-07-15 13:16:56 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-07-15 13:26:49 -0700 |
| commit | c5904e871479514b2e2e18b4fdbbe468c4e5ec8e (patch) | |
| tree | 3951c04875361305a281e6dd66b8f622fac6ca4e /src/httpserver.cpp | |
| parent | Merge #10760: Avoid dereference-of-casted-pointer (diff) | |
| parent | [utils] allow square brackets for ipv6 addresses in bitcoin-cli (diff) | |
| download | discoin-c5904e871479514b2e2e18b4fdbbe468c4e5ec8e.tar.xz discoin-c5904e871479514b2e2e18b4fdbbe468c4e5ec8e.zip | |
Merge #10812: [utils] Allow bitcoin-cli's -rpcconnect option to be used with square brackets
5c643241e [utils] allow square brackets for ipv6 addresses in bitcoin-cli (John Newbery)
fe4fabaf1 [refactor] move SplitHostPort() into utilstrencodings (John Newbery)
Pull request description:
bitcoin-cli's `-rpcconnect` can accept ipv6 addresses (as long as the libevent version is new enough), but fails to parse ipv6 with square brackets. This PR makes `bitcoin-cli` parse ipv6 in square brackets correctly.
`bitcoin-cli -rpcconnect=[::1] <command>`
should now be equivalent to
`bitcoin-cli -rpcconnect=::1 <command>`
This is useful so the `bitcoin-cli` option can now be in the same format as the `bitcoind` option.
Doesn't include tests. I have a branch that fully tests `bitcoin-cli`, but that's queued behind several intermediate PRs.
- first commit moves `SplitHostPort()` from libbitcoin_common into libbitcoin_util
- second commit adds proper ipv6 parsing to bitcoin-cli
Tree-SHA512: 249d409f10360c989474283341f458cc97364a56a7d004ae6d5f13d8bffe3a51b5dc2484d42218848e2d42cd9c0b13a1b92e94ea19b209f7e91c875c208d8409
Diffstat (limited to 'src/httpserver.cpp')
| -rw-r--r-- | src/httpserver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 1c53d8d49..290a2efca 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -7,6 +7,7 @@ #include "chainparamsbase.h" #include "compat.h" #include "util.h" +#include "utilstrencodings.h" #include "netbase.h" #include "rpc/protocol.h" // For HTTP status codes #include "sync.h" |