Mercurial > hg > orthanc
diff UnitTests/RestApi.cpp @ 332:c51c9ed603e6
fixes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 09 Jan 2013 13:57:58 +0100 |
parents | 78a8eaa5f30b |
children |
line wrap: on
line diff
--- a/UnitTests/RestApi.cpp Wed Jan 09 11:48:51 2013 +0100 +++ b/UnitTests/RestApi.cpp Wed Jan 09 13:57:58 2013 +0100 @@ -15,7 +15,7 @@ HttpHandler::Arguments headers; HttpHandler::Arguments cookies; - headers["cookies"] = "a=b;c=d;;;e=f;;g=h;"; + headers["cookie"] = "a=b;c=d;;;e=f;;g=h;"; HttpHandler::ParseCookies(cookies, headers); ASSERT_EQ(4u, cookies.size()); ASSERT_EQ("b", cookies["a"]); @@ -23,17 +23,17 @@ ASSERT_EQ("f", cookies["e"]); ASSERT_EQ("h", cookies["g"]); - headers["cookies"] = " name = value ; name2=value2"; + headers["cookie"] = " name = value ; name2=value2"; HttpHandler::ParseCookies(cookies, headers); ASSERT_EQ(2u, cookies.size()); ASSERT_EQ("value", cookies["name"]); ASSERT_EQ("value2", cookies["name2"]); - headers["cookies"] = " ;;; "; + headers["cookie"] = " ;;; "; HttpHandler::ParseCookies(cookies, headers); ASSERT_EQ(0u, cookies.size()); - headers["cookies"] = " ; n=v ;; "; + headers["cookie"] = " ; n=v ;; "; HttpHandler::ParseCookies(cookies, headers); ASSERT_EQ(1u, cookies.size()); ASSERT_EQ("v", cookies["n"]);