aboutsummaryrefslogtreecommitdiff
path: root/src/httprpc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))practicalswift2017-11-091-1/+1
|
* Use unique_ptr for httpRPCTimerInterface (HTTPRPCTimerInterface)practicalswift2017-11-091-6/+5
|
* Fix uninitialized URI in batch RPC requestsRussell Yanofsky2017-10-031-1/+1
| | | | | | | | | | | | This fixes "Wallet file not specified" errors when making batch wallet RPC calls with more than one wallet loaded. This issue was reported by NicolasDorier <[email protected]> https://github.com/bitcoin/bitcoin/issues/11257 Request URI is not used for anything except multiwallet request dispatching, so this change has no other effects. Fixes #11257
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-1/+1
| | | | In order to avoid unintended implicit conversions.
* Use nullptr instead of zero (0) as the null pointer constantpracticalswift2017-08-161-2/+2
|
* scripted-diff: stop using the gArgs wrappersMarko Bencun2017-08-141-2/+2
| | | | | | | | They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
* Register wallet endpointJonas Schnelli2017-07-171-1/+4
|
* Merge #10193: scripted-diff: Remove #include <boost/foreach.hpp>Wladimir J. van der Laan2017-07-041-1/+0
|\ | | | | | | | | | | | | | | | | | | b1268a1 clang-format: Delete ForEachMacros (Jorge Timón) 5995735 scripted-diff: Remove #include <boost/foreach.hpp> (Jorge Timón) 3eff827 scripted-diff: Remove BOOST_REVERSE_FOREACH (Jorge Timón) 33aed5b Fix const_reverse_iterator constructor (pass const ptr) (Jorge Timón) 300851e Introduce src/reverse_iterator.hpp and include it... (Jorge Timón) Tree-SHA512: df3405328e9602d0a433ac134ba59a5c9a6202ef64188df2f94a59b2ce58dec7c988b25d0671c7937de516a96b2e6daeb9d04c82fa363b616ee4cf6e9cb0fac6
| * scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón2017-06-221-1/+0
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
* | Use the override specifier (C++11) where we expect to be overriding the ↵practicalswift2017-06-281-2/+2
| | | | | | | | virtual function of a base class
* | Indentation after 'Remove redundant calls to gArgs.IsArgSet()'Jorge Timón2017-06-271-25/+25
| |
* | Util: Remove redundant calls to gArgs.IsArgSet()Jorge Timón2017-06-271-4/+1
|/ | | | | Return empty std::vector<std::string> with ArgsManager::GetArgs if nothing is set for that string
* Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille2017-06-131-2/+2
|\ | | | | | | | | | | | | | | | | 1238f13cf scripted-diff: Remove PAIRTYPE (Jorge Timón) 18dc3c396 scripted-diff: Remove Q_FOREACH (Jorge Timón) 7c00c2672 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón) a5410ac5e Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
| * scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-1/+1
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
| * Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> ↵Jorge Timón2017-06-051-1/+1
| | | | | | | | removal
* | Remove duplicate includespracticalswift2017-06-091-1/+0
|/
* Merge #10395: Replace boost::function with std::function (C++11)Pieter Wuille2017-05-171-2/+2
|\ | | | | | | | | | | 1b936f5 Replace boost::function with std::function (C++11) (practicalswift) Tree-SHA512: c4faec8cf3f801842010976115681f68ffa08fbc97ba50b22e95c936840f47e1b3bd8d7fd2f5b4e094b5a46bf3d29fc90b69d975a99e77322c0d19f8a00d53d3
| * Replace boost::function with std::function (C++11)practicalswift2017-05-131-2/+2
| |
* | Util: Small improvements in gArgs usageJorge Timón2017-05-091-1/+1
| | | | | | | | | | - Don't check gArgs.IsArgSet() is greater than 0 - Remove unneeded calls and local variables
* | scripted-diff: Util: Encapsulate mapMultiArgs behind gArgsJorge Timón2017-05-091-2/+2
|/ | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/mapMultiArgs.count(/gArgs.IsArgSet(/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i 's/mapMultiArgs.at("/gArgs.GetArgs("/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell2017-04-011-3/+3
| | | | | | | | | | | | | | | | | This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
* Make KEY_SIZE a compile-time constantPieter Wuille2017-02-171-1/+1
|
* [trivial] Fix typos in commentspracticalswift2017-01-271-1/+1
|
* Fix memory leak in multiUserAuthorizedPieter Wuille2017-01-121-2/+2
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Un-expose mapArgs from utils.hMatt Corallo2016-12-241-2/+2
|
* Fix non-const mapMultiArgs[] access after init.Matt Corallo2016-12-231-1/+1
| | | | | Swap mapMultiArgs for a const-reference to a _mapMultiArgs which is only accessed in util.cpp
* [RPC] pass HTTP basic authentication username to the JSONRequest objectJonas Schnelli2016-10-191-4/+7
|
* [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-2/+5
|
* Do not shadow member variablesPavel Janík2016-07-311-1/+1
|
* Make sure LogPrintf strings are line-terminatedMarcoFalke2016-03-011-1/+1
|
* rpc: Add WWW-Authenticate header to 401 responseWladimir J. van der Laan2016-02-081-0/+5
| | | | | | | | | | A WWW-Authenticate header must be present in the 401 response to make clients know that they can authenticate, and how. WWW-Authenticate: Basic realm="jsonrpc" Fixes #7462.
* Merge #7348: MOVE ONLY: move rpc* to rpc/Wladimir J. van der Laan2016-01-281-2/+2
|\ | | | | | | | | d13f65e rpc: update inline comments to refer to new file paths (Daniel Cousens) a0eaff8 move rpc* to rpc/ (Daniel Cousens)
| * move rpc* to rpc/Daniel Cousens2016-01-211-2/+2
| |
* | Merge #7300: [trivial] Add missing copyright headersWladimir J. van der Laan2016-01-271-0/+4
|\ \ | |/ |/| | | | | | | fabcee1 Remove copyright header from autogenerated chainparamsseeds.h (MarcoFalke) fa60d05 Add missing copyright headers (MarcoFalke) fa7e4c0 Bump copyright headers to 2014 (MarcoFalke)
| * Add missing copyright headersMarcoFalke2016-01-051-0/+4
| |
* | [RPC] remove the option of having multiple timer interfacesJonas Schnelli2016-01-081-2/+2
|/
* Added additional config option for multiple RPC users.Gregory Sanders2015-11-291-1/+55
|
* Implement RPCTimerHandler for Qt RPC consoleWladimir J. van der Laan2015-09-031-15/+7
| | | | | | | Implement RPCTimerHandler for Qt RPC console, so that `walletpassphrase` works with GUI and `-server=0`. Also simplify HTTPEvent-related code by using boost::function directly.
* evhttpd implementationWladimir J. van der Laan2015-09-031-0/+201
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*. boost::asio is not part of C++11, so unlike other boost there is no forwards-compatibility reason to stick with it. Together with #4738 (convert json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with regard to compile-time slowness. - *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling is handled by libevent, a work queue (with configurable depth and parallelism) is used to handle application requests. - *Wrap HTTP request in C++ class*; this makes the application code mostly HTTP-server-neutral - *Refactor RPC to move all http-specific code to a separate file*. Theoreticaly this can allow building without HTTP server but with another RPC backend, e.g. Qt's debug console (currently not implemented) or future RPC mechanisms people may want to use. - *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL paths they want to handle. By using a proven, high-performance asynchronous networking library (also used by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided. What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests pass. The aim for now is everything but SSL support. Configuration options: - `-rpcthreads`: repurposed as "number of work handler threads". Still defaults to 4. - `-rpcworkqueue`: maximum depth of work queue. When this is reached, new requests will return a 500 Internal Error. - `-rpctimeout`: inactivity time, in seconds, after which to disconnect a client. - `-debug=http`: low-level http activity logging