Change parser seperator of BoxSchemeHandler
authorYunchan Cho <yunchan.cho@samsung.com>
Mon, 8 Apr 2013 08:05:12 +0000 (17:05 +0900)
committerYunchan Cho <yunchan.cho@samsung.com>
Mon, 8 Apr 2013 08:07:21 +0000 (17:07 +0900)
[Issue#] WEB-2905
[Problem] If value of 'box' scheme key has '&' character, the value is parsed partially.
[Cause] 'box' scheme uses '&' character as seperator of key/value.
        '&' character can be also used by value. So other character is needed as 'box' scheme seperator for avoiding conlict.
[Solution] BoxSchemeHandler use '@' character as seperator

Change-Id: I0ea88b654688ce16d2cb0fadbc76a0fda9132c69

src/Core/BoxSchemeHandler.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 56341d2..3475dfb
@@ -204,10 +204,10 @@ std::string BoxSchemeHandler::parse(std::string& uri, std::string& key)
             break;
         }
 
-        unsigned next = query.find_first_of("&", found + 1);
+        unsigned next = query.find_first_of("@", found + 1);
         if (!query.compare(found, key.size(), key)) {
             LogD("key matched!\n");
-            value = std::string(query, seperator + 1, next - seperator);
+            value = std::string(query, seperator + 1, next - seperator - 1);
             break;
         }