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:
Jeff Garzik
2014-06-04 11:24:43 -04:00
parent 236ae8665e
commit c912e22db0
3 changed files with 27 additions and 14 deletions

View File

@@ -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
{