Results 1 to 6 of 6

Thread: QNetworkAccessManager can't handle multiple cookies?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QNetworkAccessManager can't handle multiple cookies?

    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:

    Qt Code:
    1. QList<QNetworkCookie> cookieList = qvariant_cast<QList<QNetworkCookie> >(reply->header(QNetworkRequest::SetCookieHeader));
    2. int count = cookieList.count();
    To copy to clipboard, switch view to plain text mode 

    "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
    Last edited by krippy2k; 7th June 2009 at 19:05.

Similar Threads

  1. How to put custom handle image in QSlider using code?
    By montylee in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 19:38
  2. OS/X how to get physical display handle
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 3rd January 2009, 19:51
  3. QSlider custom handle image not displayed
    By planglois in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2008, 13:49
  4. Multiple project files in a single directory
    By jogeshwarakundi in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 17th July 2008, 07:03
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.