aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/http_util/http_util.cpp
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-01-04 21:35:24 +0100
committerDaniel Neus <[email protected]>2016-01-04 21:35:24 +0100
commit443a5c25db02aa7ac505fdc3b0fa60c1d584a5f1 (patch)
tree6683223da4ea9917914c0eb9d7d1110cc86ac6f6 /src/lib/utils/http_util/http_util.cpp
parent9d3ad9a0f44a9321185ed9f221c828dac81b9f0c (diff)
String comparision fixes
fix PVS-Studio perfomance warnings
Diffstat (limited to 'src/lib/utils/http_util/http_util.cpp')
-rw-r--r--src/lib/utils/http_util/http_util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/http_util/http_util.cpp b/src/lib/utils/http_util/http_util.cpp
index 6d4e7c8e8..1286e4026 100644
--- a/src/lib/utils/http_util/http_util.cpp
+++ b/src/lib/utils/http_util/http_util.cpp
@@ -127,7 +127,7 @@ Response http_sync(http_exch_fn http_transact,
else if(verb == "POST")
outbuf << "Content-Length: " << body.size() << "\r\n";
- if(content_type != "")
+ if(!content_type.empty())
outbuf << "Content-Type: " << content_type << "\r\n";
outbuf << "Connection: close\r\n\r\n";
outbuf.write(reinterpret_cast<const char*>(body.data()), body.size());
@@ -184,7 +184,7 @@ Response http_sync(http_exch_fn http_transact,
const std::string header_size = search_map(headers, std::string("Content-Length"));
- if(header_size != "")
+ if(!header_size.empty())
{
if(resp_body.size() != to_u32bit(header_size))
throw Exception("Content-Length disagreement, header says " +