Hello! This noob here has a problem and needs help ^^
My task is:
-Map the requests made by a browser created with QT(Arora);
-Group the requests by their reply`s header`s content-type;

while looking through the source I found the class NetworkAccessManager, child of QNetworkAccessManager, that I supose it manages all network connections.
In the method createRequest I used a qdebug to see all the headers of my request`s reply, but the problem is.....I can`t see many of them, even ones that I`m sure it has header(I looked with other tools), their header does not appear....

Finally, my questions are:
1)How can I get the type of the file I`m receiving on each request I make?
2)Is there something that clears the header of the reply internally inside the qtweb?
3)Is there another way to make this code work? XD

I used the following code to try to see the headers
Qt Code:
  1. QList<QByteArray> l = reply->rawHeaderList();
  2. int sz = l.count();
  3. qDebug() << sz;
  4. for(int i = 0;i<sz;i++){
  5. qDebug()<<r->rawHeaderList()[i];
  6. }
To copy to clipboard, switch view to plain text mode 
Here is the function code
Qt Code:
  1. QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
  2. {
  3. if (op == PostOperation && outgoingData) {
  4. QByteArray outgoingDataByteArray = outgoingData->peek(1024 * 1024);
  5. BrowserApplication::autoFillManager()->post(request, outgoingDataByteArray);
  6. }
  7.  
  8. QNetworkReply *reply = 0;
  9. // Check if there is a valid handler registered for the requested URL scheme
  10. if (m_schemeHandlers.contains(request.url().scheme()))
  11. reply = m_schemeHandlers[request.url().scheme()]->createRequest(op, request, outgoingData);
  12. if (reply){
  13. return reply;
  14. }
  15.  
  16. QNetworkRequest req = request;
  17. #if QT_VERSION >= 0x040600
  18. req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
  19. #endif
  20. if (!m_acceptLanguage.isEmpty())
  21. req.setRawHeader("Accept-Language", m_acceptLanguage);
  22.  
  23. // Adblock
  24. if (op == QNetworkAccessManager::GetOperation) {
  25. if (!m_adblockNetwork)
  26. m_adblockNetwork = AdBlockManager::instance()->network();
  27. reply = m_adblockNetwork->block(req);
  28. if (reply){
  29. return reply;
  30. }
  31. }
  32.  
  33. reply = QNetworkAccessManager::createRequest(op, req, outgoingData);
  34. emit requestCreated(op, req, reply);
  35. return reply;
  36. }
To copy to clipboard, switch view to plain text mode