Skip to content

Commit

Permalink
use find instead of count
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Jan 27, 2023
1 parent ee01f00 commit 6d3643e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ static int makeNonBlocking(int sockfd) {
}

int Exiv2::http(Exiv2::Dictionary& request, Exiv2::Dictionary& response, std::string& errors) {
if (!request.count("verb"))
if (request.find("verb") == request.end())
request["verb"] = "GET";
if (!request.count("header"))
if (request.find("header") == request.end())
request["header"] = "";
if (!request.count("version"))
if (request.find("version") == request.end())
request["version"] = "1.0";
if (!request.count("port"))
if (request.find("port") == request.end())
request["port"] = "";

std::string file;
Expand Down

0 comments on commit 6d3643e

Please sign in to comment.