Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
4.6.2
-
None
-
winxp 64, vs2010, qt 4.6.2
Description
Let me start by saying I'm interfacing with the web server on an iBootBar from Dataprobe. This looks to be a homegrown system, so may not be standards compliant. However, the web interface works fine with Firefox and I can track the cookie value coming to and from the browser (point being, Firefox sends the correct value back).
I'm using square brackets to illustrate the exact value I'm getting, they are not part of the value.
When I successfully login to the webserver the cookie I get back is [DCRABBIT="0"] (note the quotes).
Qt strips the quotes when it stores the cookie... or when it goes to send it back, I'm unsure which.
When I issue my next GET the cookie is sent to the server as [DCRABBIT=0]. I had to manually set a new cookie in the cookie jar which had the quotes in the value. When I do this, the cookie is delivered correctly as [DCRABBIT="0"].
At first I thought maybe all header values are supposed to be urlencoded, but there are plenty that are not (User-Agent being a prominent one).
Should be fairly easy to replicate with a php script on a server that sends a cookie with a value of ["0"].
BTW, I used WireShark to capture the http traffic so I could see exactly what was being sent/received. Filter on http, then click on the request you want. Right click and choose Follow TCP Stream to see the full exchange.
Attachments
Issue Links
- is replaced by
-
QTBUG-17746 QNetworkCookie: do not strip cookies from quotes
-
- Closed
-
- relates to
-
QTBUG-26002 QNetworkAccessManager/QNetworkCookie/QNetworkCookieJar combo introduces backslash before quotation marks in JSON-formatted cookies
-
- Closed
-
For Gerrit Dashboard: QTBUG-11641 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
28394,2 | QNetworkCookie: Use RFC6265 rules for parsing Set-Cookie | master | qt/qtbase | Status: MERGED | +2 | 0 |