I'm trying to get a web page that returns to me 4 cookies with this part of code:
Qt Code:
  1. QNetworkAccessManager *manager = new QNetworkAccessManager(this);
  2. QNetworkRequest request;
  3. request.setUrl(QUrl(line));
  4. request.setRawHeader("User-Agent", "Firefox/3.0.10");
  5.  
  6. reply = manager->get(request);
  7.  
  8. connect(reply, SIGNAL(finished()), this, SLOT(slotReadyRead()));
  9.  
  10. void Window::slotReadyRead(){
  11. QList<QByteArray> headers=reply->rawHeaderList();
  12. QVariant cookies=reply->header(QNetworkRequest::SetCookieHeader);
  13. wget = reply->readAll();
  14. QList<QVariant> list = cookies.toList();
  15. qDebug()<<"HEADERS: "<< headers[2] << " COOKIES: " << list.size();
  16. qDebug()<<"COOKIES FROM rawHEADER: " << reply->rawHeader("Set-Cookie") ;
  17. ...
  18. ...
  19. ...
To copy to clipboard, switch view to plain text mode 
The output of the program is:
Qt Code:
  1. HEADERS: "Set-Cookie" COOKIES: 0
  2. COOKIES FROM rawHEADER: "JSESSIONID=F9C30312025976F6A8A4813CC96B8E65; Path=/app"
To copy to clipboard, switch view to plain text mode 
The cookies from rawHEADER is only 1 ... the server sends 4... what is wrong ?