Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.1
-
None
-
Gentoo Linux, x11-libs/qt-core-4.8.1-r3
-
1120328357e63596ca7d81d5365c51bc1295c5d4
Description
Some pages such as IEEExplore (of IEEE) set cookies in JSON format. Such cookies contain quotation marks, which are not correctly handled by the combo of QNetworkAccessManager, QNetworkCookie, and QNetworkCookieJar.
For example, an answer to a HTTP-GET request include the following header:
Set-Cookie: xploreCookies=
; domain=.ieee.org; path=/
Cookie "xploreCookies" is essentially JSON-formatted data.
When making subsequent requests to fetch more files from IEEE, this cookie has to be passed on. However, the "Cookie:" header in GET requests contain the JSON code in modified form, where all quotation marks are prepended by a backslash:
Cookie: WLSESSION=908223116.20480.0000; ERIGHTS=LmZ8hlXo5a9uZx2Fnyw1564T1ZOWMnf3Dk*oDx2FQHwbg6RYefyrhC8PL2wx3Dx3D-18x2d8723DyqXRnkILyGpmx2Fh9wgx3Dx3Dc2lAOhHqGSKT78xxGwXZxxCgx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D; xploreCookies="
{\"desktopReportingUrl\":\"null\",\"userIds\":\"1938850\",\"contactEmail\":\"NA\",\"contactName\":\"NA\",\"enterpriseLicenseId\":\"0\",\"openUrlTxt\":\"NA\",\"customerSurvey\":\"NA\",\"standardsLicenseId\":\"0\",\"openUrl\":\"NA\",\"smallBusinessLicenseId\":\"0\",\"instImage\":\"1938850_univ skovde.gif\",\"isMember\":\"false\",\"products\":\"IEL|VDE|\", \"openUrlImgLoc\":\"NA\",\"isIp\":\"true\",\"instName\":\"University of XXXXXX\",\"oldSessionKey\":\"LmZ8hlXo5a9uZx2Fnyw1564T1ZOWMnf3Dk* oDx2FQHwbg6RYefyrhC8PL2wx3Dx3D-18x2d8723DyqXRnkILyGpmx2Fh9wgx3Dx3Dc2lAOhHqGSKT78xxGwXZxxCgx3Dx3D-XrL4FnIlW2OPkqtVJq0LkQx3Dx3D-tujOLwhFqtX7Pa7HGqmCXQx3Dx3D\",\"isChargebackUser\":\"false\",\"isInst\":\"true\"}";
IEEE's web server does not accept such a modified cookie. Other browsers, such as Firefox, maintain the cookie's original format (i.e. without backslashes).
Attachments
Issue Links
- relates to
-
QTBUG-11641 Incoming cookies are stripped of surrounding quotes
-
- Closed
-