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>
This commit is contained in:
Shane Kearns 2012-06-08 18:59:40 +01:00 committed by Qt by Nokia
parent bd38ff3c54
commit 74d3963c25

View 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();