mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge ac5c5d0162 into merged_master (Bitcoin PR #18168)
This commit is contained in:
commit
a9d26157fb
1 changed files with 4 additions and 4 deletions
|
|
@ -237,7 +237,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
|
|||
if (hreq->GetRequestMethod() == HTTPRequest::UNKNOWN) {
|
||||
LogPrint(BCLog::HTTP, "HTTP request from %s rejected: Unknown HTTP request method\n",
|
||||
hreq->GetPeer().ToString());
|
||||
hreq->WriteReply(HTTP_BADMETHOD);
|
||||
hreq->WriteReply(HTTP_BAD_METHOD);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -269,10 +269,10 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
|
|||
item.release(); /* if true, queue took ownership */
|
||||
else {
|
||||
LogPrintf("WARNING: request rejected because http work queue depth exceeded, it can be increased with the -rpcworkqueue= setting\n");
|
||||
item->req->WriteReply(HTTP_INTERNAL, "Work queue depth exceeded");
|
||||
item->req->WriteReply(HTTP_INTERNAL_SERVER_ERROR, "Work queue depth exceeded");
|
||||
}
|
||||
} else {
|
||||
hreq->WriteReply(HTTP_NOTFOUND);
|
||||
hreq->WriteReply(HTTP_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ HTTPRequest::~HTTPRequest()
|
|||
if (!replySent) {
|
||||
// Keep track of whether reply was sent to avoid request leaks
|
||||
LogPrintf("%s: Unhandled request\n", __func__);
|
||||
WriteReply(HTTP_INTERNAL, "Unhandled request");
|
||||
WriteReply(HTTP_INTERNAL_SERVER_ERROR, "Unhandled request");
|
||||
}
|
||||
// evhttpd cleans up the request, as long as a reply was sent.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue