src/network/access/qhttpnetworkconnectionchannel.cpp
changeset 22 79de32ba3296
parent 19 fcece45ef507
child 23 89e065397ea6
equal deleted inserted replaced
19:fcece45ef507 22:79de32ba3296
   283         if (uploadByteDevice) {
   283         if (uploadByteDevice) {
   284             QObject::disconnect(uploadByteDevice, SIGNAL(readyRead()), this, SLOT(_q_uploadDataReadyRead()));
   284             QObject::disconnect(uploadByteDevice, SIGNAL(readyRead()), this, SLOT(_q_uploadDataReadyRead()));
   285         }
   285         }
   286 
   286 
   287         // HTTP pipelining
   287         // HTTP pipelining
   288         connection->d_func()->fillPipeline(socket);
   288         //connection->d_func()->fillPipeline(socket);
   289         socket->flush();
   289         //socket->flush();
   290 
   290 
   291         // ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
   291         // ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
   292         // this is needed if the sends an reply before we have finished sending the request. In that
   292         // this is needed if the sends an reply before we have finished sending the request. In that
   293         // case receiveReply had been called before but ignored the server reply
   293         // case receiveReply had been called before but ignored the server reply
   294         QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
   294         QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
   659 
   659 
   660             // pipeline even more
   660             // pipeline even more
   661             connection->d_func()->fillPipeline(socket);
   661             connection->d_func()->fillPipeline(socket);
   662 
   662 
   663             // continue reading
   663             // continue reading
   664             _q_receiveReply();
   664             //_q_receiveReply();
       
   665             // this was wrong, allDone gets called from that function anyway.
   665         }
   666         }
   666     } else if (alreadyPipelinedRequests.isEmpty() && socket->bytesAvailable() > 0) {
   667     } else if (alreadyPipelinedRequests.isEmpty() && socket->bytesAvailable() > 0) {
   667         eatWhitespace();
   668         eatWhitespace();
   668         // this is weird. we had nothing pipelined but still bytes available. better close it.
   669         // this is weird. we had nothing pipelined but still bytes available. better close it.
   669         if (socket->bytesAvailable() > 0)
   670         if (socket->bytesAvailable() > 0)
   688             // check for broken servers in server reply header
   689             // check for broken servers in server reply header
   689             // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
   690             // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining
   690             && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
   691             && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4."))
   691             && (!serverHeaderField.contains("Microsoft-IIS/5."))
   692             && (!serverHeaderField.contains("Microsoft-IIS/5."))
   692             && (!serverHeaderField.contains("Netscape-Enterprise/3."))
   693             && (!serverHeaderField.contains("Netscape-Enterprise/3."))
       
   694             // this is adpoted from the knowledge of the Nokia 7.x browser team (DEF143319)
       
   695             && (!serverHeaderField.contains("WebLogic"))
   693             ) {
   696             ) {
   694         pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;
   697         pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported;
   695     } else {
   698     } else {
   696         pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown;
   699         pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown;
   697     }
   700     }