From 70337d779d1171cf446d36b3cc4c78ed7f09489e Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 13 Mar 2020 07:43:06 +0300 Subject: [PATCH] allow interruptible_http_client to accept 2xx responses --- contrib/epee/include/net/http_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/epee/include/net/http_client.h b/contrib/epee/include/net/http_client.h index 224f92e7..492b4aab 100644 --- a/contrib/epee/include/net/http_client.h +++ b/contrib/epee/include/net/http_client.h @@ -932,7 +932,7 @@ using namespace std; m_pcb.reset(new idle_handler(cb)); const http_response_info* p_hri = nullptr; bool r = invoke_request(url, *this, timeout, &p_hri, method, body, additional_params); - if (p_hri && p_hri->m_response_code != 200) + if (p_hri && !(p_hri->m_response_code >= 200 && p_hri->m_response_code < 300)) { LOG_PRINT_L0("HTTP request to " << url << " failed with code: " << p_hri->m_response_code); return false;