mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
RPC cleanup: Improve HTTP server replies
1) support varying content types 2) support only sending the header 3) properly deliver error message as content, if HTTP error 4) move AcceptedConnection class to header, for wider use
This commit is contained in:
@@ -393,16 +393,6 @@ bool ClientAllowed(const boost::asio::ip::address& address)
|
||||
return false;
|
||||
}
|
||||
|
||||
class AcceptedConnection
|
||||
{
|
||||
public:
|
||||
virtual ~AcceptedConnection() {}
|
||||
|
||||
virtual std::iostream& stream() = 0;
|
||||
virtual std::string peer_address_to_string() const = 0;
|
||||
virtual void close() = 0;
|
||||
};
|
||||
|
||||
template <typename Protocol>
|
||||
class AcceptedConnectionImpl : public AcceptedConnection
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user