Change invalid test case (two cookies separated by ,)
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Fri, 8 Jun 2012 17:59:40 +0000 (18:59 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jun 2012 22:46:35 +0000 (00:46 +0200)
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>
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp

index ae95b18..dcdb92e 100644 (file)
@@ -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();