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() {
|
||||
while (socket.bytesAvailable()) {
|
||||
#ifdef SUPERVERBOSE
|
||||
qDebug("HttpConnectionHandler (%p): read input",this);
|
||||
#endif
|
||||
@ -146,19 +147,24 @@ void HttpConnectionHandler::read() {
|
||||
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
|
||||
//if (QString::compare(currentRequest->getHeader("Connection"),"close",Qt::CaseInsensitive)==0) {
|
||||
// socket.disconnectFromHost();
|
||||
//}
|
||||
//else {
|
||||
// // Start timer for next request
|
||||
// int readTimeout=settings->value("readTimeout",10000).toInt();
|
||||
// readTimer.start(readTimeout);
|
||||
//}
|
||||
if (QString::compare(currentRequest->getHeader("Connection"),"close",Qt::CaseInsensitive)==0) {
|
||||
socket.disconnectFromHost();
|
||||
}
|
||||
else {
|
||||
// Start timer for next request
|
||||
int readTimeout=settings->value("readTimeout",10000).toInt();
|
||||
readTimer.start(readTimeout);
|
||||
}
|
||||
// Prepare for next request
|
||||
delete currentRequest;
|
||||
currentRequest=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug("HttpConnectionHandler (%p): received request",this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user