aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/http_protocol_handler.inl
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2019-06-13 08:47:06 +0100
committerHoward Chu <hyc@symas.com>2019-06-16 11:38:08 +0100
commita182df21d0760e037219a6ae0a31b26b00489f22 (patch)
treebe176e7cfff73cdde8a110abcad57bd51bb21630 /contrib/epee/include/net/http_protocol_handler.inl
parentMerge pull request #5641 (diff)
downloadmonero-a182df21d0760e037219a6ae0a31b26b00489f22.tar.xz
Bans for RPC connections
Make bans control RPC sessions too. And auto-ban some bad requests. Drops HTTP connections whenever response code is 500.
Diffstat (limited to 'contrib/epee/include/net/http_protocol_handler.inl')
-rw-r--r--contrib/epee/include/net/http_protocol_handler.inl4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl
index ae8e43477..790d0f3b1 100644
--- a/contrib/epee/include/net/http_protocol_handler.inl
+++ b/contrib/epee/include/net/http_protocol_handler.inl
@@ -577,6 +577,10 @@ namespace net_utils
if (query_info.m_http_method != http::http_method_options)
{
res = handle_request(query_info, response);
+ if (response.m_response_code == 500)
+ {
+ m_want_close = true; // close on all "Internal server error"s
+ }
}
else
{