mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
refactor: Deleted unreachable code in httpserver.cpp
Removed all break statements from both RequestMethodString and GetRequestMethod functions as they were unreachable
This commit is contained in:
parent
3eaf7be6ad
commit
7fd3b9491b
1 changed files with 0 additions and 9 deletions
|
@ -192,16 +192,12 @@ std::string RequestMethodString(HTTPRequest::RequestMethod m)
|
|||
switch (m) {
|
||||
case HTTPRequest::GET:
|
||||
return "GET";
|
||||
break;
|
||||
case HTTPRequest::POST:
|
||||
return "POST";
|
||||
break;
|
||||
case HTTPRequest::HEAD:
|
||||
return "HEAD";
|
||||
break;
|
||||
case HTTPRequest::PUT:
|
||||
return "PUT";
|
||||
break;
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
|
@ -626,19 +622,14 @@ HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const
|
|||
switch (evhttp_request_get_command(req)) {
|
||||
case EVHTTP_REQ_GET:
|
||||
return GET;
|
||||
break;
|
||||
case EVHTTP_REQ_POST:
|
||||
return POST;
|
||||
break;
|
||||
case EVHTTP_REQ_HEAD:
|
||||
return HEAD;
|
||||
break;
|
||||
case EVHTTP_REQ_PUT:
|
||||
return PUT;
|
||||
break;
|
||||
default:
|
||||
return UNKNOWN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue