Improve QHttpNetworkReplyPrivate::readStatus()

Check HTTP signature only once in cycle.

Change-Id: I06f6b778429243ed17cd4175e532ef201f1e5551
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This commit is contained in:
Alex Trotsenko 2016-04-13 20:21:10 +03:00
parent a5c6bad4f0
commit f15cfbfdee

View File

@ -484,8 +484,7 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
}
// is this a valid reply?
if (fragment.length() >= 5 && !fragment.startsWith("HTTP/"))
{
if (fragment.length() == 5 && !fragment.startsWith("HTTP/")) {
fragment.clear();
return -1;
}