krippy2k
7th June 2009, 18:53
Hi all,
I'm wondering if anybody else sees this problem.
When I use QNetworkAccessManager to handle HTTP connections, I have noticed that if the server issues several Set-Cookie headers that only the first one is added to the cookie jar.
If I dump the headers from the QNetworkReply I see that "Set-Cookie" shows all of the cookies that are received from the server, but if I do this immediately after:
QList<QNetworkCookie> cookieList = qvariant_cast<QList<QNetworkCookie> >(reply->header(QNetworkRequest::SetCookieHeader));
int count = cookieList.count();
"count" is always 1. And then if I access the cookie jar for the corresponding URL it only returns 1 cookie. I have a feeling that because it's several headers with the same name it's combining them all into one header and thus one cookie.
I'm going to see if I can track this down in the sources, but just wondering in the meantime if this works correctly for anybody else?
Thanks
I'm wondering if anybody else sees this problem.
When I use QNetworkAccessManager to handle HTTP connections, I have noticed that if the server issues several Set-Cookie headers that only the first one is added to the cookie jar.
If I dump the headers from the QNetworkReply I see that "Set-Cookie" shows all of the cookies that are received from the server, but if I do this immediately after:
QList<QNetworkCookie> cookieList = qvariant_cast<QList<QNetworkCookie> >(reply->header(QNetworkRequest::SetCookieHeader));
int count = cookieList.count();
"count" is always 1. And then if I access the cookie jar for the corresponding URL it only returns 1 cookie. I have a feeling that because it's several headers with the same name it's combining them all into one header and thus one cookie.
I'm going to see if I can track this down in the sources, but just wondering in the meantime if this works correctly for anybody else?
Thanks