changeset 334:ae0818659d50

cleaning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jan 2013 15:52:45 +0100
parents c730f6e42848
children daff912c9ffe
files Core/HttpServer/HttpHandler.cpp
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
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));
   }