summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-06-08 18:59:40 +0100
committerQt by Nokia <qt-info@nokia.com>2012-06-27 00:46:35 +0200
commit74d3963c25558846d7efe99260f90159c1adb49a (patch)
treeefc87a57c1e9391e601dfc9f07392344e2197700
parentbd38ff3c5456b1f2fc03e4899e73d650ad5f858a (diff)
Change invalid test case (two cookies separated by ,)
Two cookies in a single Set-Cookie header are no longer allowed. Check that this header is parsed according to RFC6265 rules instead Change-Id: Ice48bbe78a9886208f7d1186cf1d8c37f46f1252 Reviewed-by: Richard J. Moore <rich@kde.org>
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index ae95b18b7b..dcdb92ed10 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -4918,8 +4918,15 @@ void tst_QNetworkReply::receiveCookiesFromHttp_data()
cookie.setName("c");
cookie.setValue("d");
jar << cookie;
- QTest::newRow("two-cookies") << "a=b, c=d" << header << jar;
- QTest::newRow("two-cookies-2") << "a=b\nc=d" << header << jar;
+ QTest::newRow("two-cookies") << "a=b\nc=d" << header << jar;
+
+ header.clear();
+ jar.clear();
+ header << QNetworkCookie("a", "b, c=d");
+ cookie.setName("a");
+ cookie.setValue("b, c=d");
+ jar << cookie;
+ QTest::newRow("invalid-two-cookies") << "a=b, c=d" << header << jar;
header.clear();
jar.clear();