Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
333:c730f6e42848 | 334:ae0818659d50 |
---|---|
38 { | 38 { |
39 static void SplitGETNameValue(HttpHandler::Arguments& result, | 39 static void SplitGETNameValue(HttpHandler::Arguments& result, |
40 const char* start, | 40 const char* start, |
41 const char* end) | 41 const char* end) |
42 { | 42 { |
43 std::string name, value; | |
44 | |
43 const char* equal = strchr(start, '='); | 45 const char* equal = strchr(start, '='); |
44 if (equal == NULL || equal >= end) | 46 if (equal == NULL || equal >= end) |
45 { | 47 { |
46 result.insert(std::make_pair(std::string(start, end - start), "")); | 48 name = std::string(start, end - start); |
49 //value = ""; | |
47 } | 50 } |
48 else | 51 else |
49 { | 52 { |
50 result.insert(std::make_pair(std::string(start, equal - start), | 53 name = std::string(start, equal - start); |
51 std::string(equal + 1, end))); | 54 value = std::string(equal + 1, end); |
52 } | 55 } |
56 | |
57 result.insert(std::make_pair(name, value)); | |
53 } | 58 } |
54 | 59 |
55 | 60 |
56 void HttpHandler::ParseGetQuery(HttpHandler::Arguments& result, const char* query) | 61 void HttpHandler::ParseGetQuery(HttpHandler::Arguments& result, const char* query) |
57 { | 62 { |