summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-04-13 20:21:10 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2016-04-14 11:55:13 +0000
commitf15cfbfdee9e756bb70b6c2bd10d1479fb52afcb (patch)
tree2ed76a920cb013b6c29f4d7df7c539cce759d45f
parenta5c6bad4f02d78dff2afca84fd0c9fc12c3eaf49 (diff)
Improve QHttpNetworkReplyPrivate::readStatus()
Check HTTP signature only once in cycle. Change-Id: I06f6b778429243ed17cd4175e532ef201f1e5551 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
-rw-r--r--src/network/access/qhttpnetworkreply.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 3601c36bc2..9476cf8715 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -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;
}