mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
updated HttpConnectionHandler for a better support of UIWebView connections when data plan is used
This commit is contained in:
parent
d310289b21
commit
401c1ab1d9
@ -99,6 +99,7 @@ void HttpConnectionHandler::disconnected() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HttpConnectionHandler::read() {
|
void HttpConnectionHandler::read() {
|
||||||
|
while (socket.bytesAvailable()) {
|
||||||
#ifdef SUPERVERBOSE
|
#ifdef SUPERVERBOSE
|
||||||
qDebug("HttpConnectionHandler (%p): read input",this);
|
qDebug("HttpConnectionHandler (%p): read input",this);
|
||||||
#endif
|
#endif
|
||||||
@ -146,19 +147,24 @@ void HttpConnectionHandler::read() {
|
|||||||
response.write(QByteArray(),true);
|
response.write(QByteArray(),true);
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.disconnectFromHost(); //CAMBIADO sólo se van a soportar conexiones NO persistentes
|
//socket.disconnectFromHost(); //CAMBIADO sólo se van a soportar conexiones NO persistentes
|
||||||
|
|
||||||
// Close the connection after delivering the response, if requested
|
// Close the connection after delivering the response, if requested
|
||||||
//if (QString::compare(currentRequest->getHeader("Connection"),"close",Qt::CaseInsensitive)==0) {
|
if (QString::compare(currentRequest->getHeader("Connection"),"close",Qt::CaseInsensitive)==0) {
|
||||||
// socket.disconnectFromHost();
|
socket.disconnectFromHost();
|
||||||
//}
|
}
|
||||||
//else {
|
else {
|
||||||
// // Start timer for next request
|
// Start timer for next request
|
||||||
// int readTimeout=settings->value("readTimeout",10000).toInt();
|
int readTimeout=settings->value("readTimeout",10000).toInt();
|
||||||
// readTimer.start(readTimeout);
|
readTimer.start(readTimeout);
|
||||||
//}
|
}
|
||||||
// Prepare for next request
|
// Prepare for next request
|
||||||
delete currentRequest;
|
delete currentRequest;
|
||||||
currentRequest=0;
|
currentRequest=0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug("HttpConnectionHandler (%p): received request",this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user