Mercurial > hg > orthanc
diff Core/HttpServer/HttpHandler.cpp @ 334:ae0818659d50
cleaning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Jan 2013 15:52:45 +0100 |
parents | c51c9ed603e6 |
children | 3c291753231f |
line wrap: on
line diff
--- a/Core/HttpServer/HttpHandler.cpp Wed Jan 09 15:40:10 2013 +0100 +++ b/Core/HttpServer/HttpHandler.cpp Thu Jan 10 15:52:45 2013 +0100 @@ -40,16 +40,21 @@ const char* start, const char* end) { + std::string name, value; + const char* equal = strchr(start, '='); if (equal == NULL || equal >= end) { - result.insert(std::make_pair(std::string(start, end - start), "")); + name = std::string(start, end - start); + //value = ""; } else { - result.insert(std::make_pair(std::string(start, equal - start), - std::string(equal + 1, end))); + name = std::string(start, equal - start); + value = std::string(equal + 1, end); } + + result.insert(std::make_pair(name, value)); }