mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
proxy: cleanup
This commit is contained in:
1 parent
42398a541d
commit
f710df9675
4 files changed
+35
-44
No files matched your search
@@ -951,14 +951,12 @@ DhtProxyServer::put(restinio::request_handle_t request,
|
||||
infoHash = dht::InfoHash::get(params["hash"].to_string());
|
||||
|
||||
if (!dht_){
|
||||
auto response = this->initHttpResponse(
|
||||
request->create_response(restinio::status_service_unavailable()));
|
||||
auto response = initHttpResponse(request->create_response(restinio::status_service_unavailable()));
|
||||
response.set_body(RESP_MSG_SERVICE_UNAVAILABLE);
|
||||
return response.done();
|
||||
}
|
||||
else if (request->body().empty()){
|
||||
auto response = this->initHttpResponse(
|
||||
request->create_response(restinio::status_bad_request()));
|
||||
auto response = initHttpResponse(request->create_response(restinio::status_bad_request()));
|
||||
response.set_body(RESP_MSG_MISSING_PARAMS);
|
||||
return response.done();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user