qhttpnetworkreply.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/access/qhttpnetworkreply.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12QHttpNetworkReply::QHttpNetworkReply(const QUrl &url, QObject *parent)-
13 : QObject(*new QHttpNetworkReplyPrivate(url), parent)-
14{-
15}
executed 2205 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2205
16-
17QHttpNetworkReply::~QHttpNetworkReply()-
18{-
19 QHttpNetworkReplyPrivate * const d = d_func();-
20 if (d->connection
d->connectionDescription
TRUEevaluated 1567 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
FALSEevaluated 467 times by 9 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
467-1567
21 d->connection->d_func()->removeReply(this);-
22 }
executed 1566 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1566
23-
24-
25 if (d->autoDecompress
d->autoDecompressDescription
TRUEevaluated 48 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
FALSEevaluated 1985 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& d->isCompressed()
d->isCompressed()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 41 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
&& d->inflateStrm
d->inflateStrmDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-1985
26 inflateEnd(d->inflateStrm);
executed 7 times by 1 test: inflateEnd(d->inflateStrm);
Executed by:
  • tst_QNetworkReply
7
27-
28}
executed 2033 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2033
29-
30QUrl QHttpNetworkReply::url() const-
31{-
32 return
never executed: return d_func()->url;
d_func()->url;
never executed: return d_func()->url;
0
33}-
34void QHttpNetworkReply::setUrl(const QUrl &url)-
35{-
36 QHttpNetworkReplyPrivate * const d = d_func();-
37 d->url = url;-
38}
never executed: end of block
0
39-
40QUrl QHttpNetworkReply::redirectUrl() const-
41{-
42 return
executed 5 times by 1 test: return d_func()->redirectUrl;
Executed by:
  • tst_QNetworkReply
d_func()->redirectUrl;
executed 5 times by 1 test: return d_func()->redirectUrl;
Executed by:
  • tst_QNetworkReply
5
43}-
44-
45void QHttpNetworkReply::setRedirectUrl(const QUrl &url)-
46{-
47 QHttpNetworkReplyPrivate * const d = d_func();-
48 d->redirectUrl = url;-
49}
executed 5 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
5
50-
51bool QHttpNetworkReply::isHttpRedirect(int statusCode)-
52{-
53 return
executed 23 times by 1 test: return (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 305 || statusCode == 307);
Executed by:
  • tst_QNetworkReply
(statusCode == 301 || statusCode == 302 || statusCode == 303
executed 23 times by 1 test: return (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 305 || statusCode == 307);
Executed by:
  • tst_QNetworkReply
23
54 || statusCode == 305 || statusCode == 307);
executed 23 times by 1 test: return (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 305 || statusCode == 307);
Executed by:
  • tst_QNetworkReply
23
55}-
56-
57qint64 QHttpNetworkReply::contentLength() const-
58{-
59 return
executed 1571 times by 7 tests: return d_func()->contentLength();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
d_func()->contentLength();
executed 1571 times by 7 tests: return d_func()->contentLength();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1571
60}-
61-
62void QHttpNetworkReply::setContentLength(qint64 length)-
63{-
64 QHttpNetworkReplyPrivate * const d = d_func();-
65 d->setContentLength(length);-
66}
executed 22 times by 1 test: end of block
Executed by:
  • tst_Spdy
22
67-
68QList<QPair<QByteArray, QByteArray> > QHttpNetworkReply::header() const-
69{-
70 return
executed 1332 times by 12 tests: return d_func()->fields;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d_func()->fields;
executed 1332 times by 12 tests: return d_func()->fields;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1332
71}-
72-
73QByteArray QHttpNetworkReply::headerField(const QByteArray &name, const QByteArray &defaultValue) const-
74{-
75 return
executed 2209 times by 13 tests: return d_func()->headerField(name, defaultValue);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d_func()->headerField(name, defaultValue);
executed 2209 times by 13 tests: return d_func()->headerField(name, defaultValue);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2209
76}-
77-
78void QHttpNetworkReply::setHeaderField(const QByteArray &name, const QByteArray &data)-
79{-
80 QHttpNetworkReplyPrivate * const d = d_func();-
81 d->setHeaderField(name, data);-
82}
executed 449 times by 1 test: end of block
Executed by:
  • tst_Spdy
449
83-
84void QHttpNetworkReply::parseHeader(const QByteArray &header)-
85{-
86 QHttpNetworkReplyPrivate * const d = d_func();-
87 d->parseHeader(header);-
88}
executed 7 times by 1 test: end of block
Executed by:
  • tst_qhttpnetworkreply - unknown status
7
89-
90QHttpNetworkRequest QHttpNetworkReply::request() const-
91{-
92 return
executed 1068 times by 4 tests: return d_func()->request;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
d_func()->request;
executed 1068 times by 4 tests: return d_func()->request;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1068
93}-
94-
95void QHttpNetworkReply::setRequest(const QHttpNetworkRequest &request)-
96{-
97 QHttpNetworkReplyPrivate * const d = d_func();-
98 d->request = request;-
99 d->ssl = request.isSsl();-
100}
executed 1753 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1753
101-
102int QHttpNetworkReply::statusCode() const-
103{-
104 return
executed 3843 times by 12 tests: return d_func()->statusCode;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d_func()->statusCode;
executed 3843 times by 12 tests: return d_func()->statusCode;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
3843
105}-
106-
107void QHttpNetworkReply::setStatusCode(int code)-
108{-
109 QHttpNetworkReplyPrivate * const d = d_func();-
110 d->statusCode = code;-
111}
executed 107 times by 1 test: end of block
Executed by:
  • tst_Spdy
107
112-
113QString QHttpNetworkReply::errorString() const-
114{-
115 return
never executed: return d_func()->errorString;
d_func()->errorString;
never executed: return d_func()->errorString;
0
116}-
117-
118QString QHttpNetworkReply::reasonPhrase() const-
119{-
120 return
executed 814 times by 7 tests: return d_func()->reasonPhrase;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
d_func()->reasonPhrase;
executed 814 times by 7 tests: return d_func()->reasonPhrase;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
814
121}-
122-
123void QHttpNetworkReply::setErrorString(const QString &error)-
124{-
125 QHttpNetworkReplyPrivate * const d = d_func();-
126 d->errorString = error;-
127}
never executed: end of block
0
128-
129int QHttpNetworkReply::majorVersion() const-
130{-
131 return
executed 3 times by 1 test: return d_func()->majorVersion;
Executed by:
  • tst_qhttpsocketengine - unknown status
d_func()->majorVersion;
executed 3 times by 1 test: return d_func()->majorVersion;
Executed by:
  • tst_qhttpsocketengine - unknown status
3
132}-
133-
134int QHttpNetworkReply::minorVersion() const-
135{-
136 return
executed 3 times by 1 test: return d_func()->minorVersion;
Executed by:
  • tst_qhttpsocketengine - unknown status
d_func()->minorVersion;
executed 3 times by 1 test: return d_func()->minorVersion;
Executed by:
  • tst_qhttpsocketengine - unknown status
3
137}-
138-
139qint64 QHttpNetworkReply::bytesAvailable() const-
140{-
141 const QHttpNetworkReplyPrivate * const d = d_func();-
142 if (d->connection
d->connectionDescription
TRUEevaluated 12636 times by 1 test
Evaluated by:
  • tst_QHttpNetworkConnection
FALSEnever evaluated
)
0-12636
143 return
executed 12636 times by 1 test: return d->connection->d_func()->uncompressedBytesAvailable(*this);
Executed by:
  • tst_QHttpNetworkConnection
d->connection->d_func()->uncompressedBytesAvailable(*this);
executed 12636 times by 1 test: return d->connection->d_func()->uncompressedBytesAvailable(*this);
Executed by:
  • tst_QHttpNetworkConnection
12636
144 else-
145 return
never executed: return -1;
-1;
never executed: return -1;
0
146}-
147-
148qint64 QHttpNetworkReply::bytesAvailableNextBlock() const-
149{-
150 const QHttpNetworkReplyPrivate * const d = d_func();-
151 if (d->connection
d->connectionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
152 return
never executed: return d->connection->d_func()->uncompressedBytesAvailableNextBlock(*this);
d->connection->d_func()->uncompressedBytesAvailableNextBlock(*this);
never executed: return d->connection->d_func()->uncompressedBytesAvailableNextBlock(*this);
0
153 else-
154 return
never executed: return -1;
-1;
never executed: return -1;
0
155}-
156-
157bool QHttpNetworkReply::readAnyAvailable() const-
158{-
159 const QHttpNetworkReplyPrivate * const d = d_func();-
160 return
executed 19841 times by 6 tests: return (d->responseData.bufferCount() > 0);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(d->responseData.bufferCount() > 0);
executed 19841 times by 6 tests: return (d->responseData.bufferCount() > 0);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
19841
161}-
162-
163QByteArray QHttpNetworkReply::readAny()-
164{-
165 QHttpNetworkReplyPrivate * const d = d_func();-
166 if (d->responseData.bufferCount() == 0
d->responseDat...erCount() == 0Description
TRUEnever evaluated
FALSEevaluated 6517 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
)
0-6517
167 return
never executed: return QByteArray();
QByteArray();
never executed: return QByteArray();
0
168-
169-
170 if (d->downstreamLimited
d->downstreamLimitedDescription
TRUEevaluated 211 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 6306 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
&& d->responseData.bufferCount() == 1
d->responseDat...erCount() == 1Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&& !isFinished()
!isFinished()Description
TRUEevaluated 189 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
3-6306
171 d->connection->d_func()->readMoreLater(this);
executed 189 times by 1 test: d->connection->d_func()->readMoreLater(this);
Executed by:
  • tst_QNetworkReply
189
172 return
executed 6517 times by 5 tests: return d->responseData.read();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
d->responseData.read();
executed 6517 times by 5 tests: return d->responseData.read();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
  • tst_Spdy
6517
173}-
174-
175QByteArray QHttpNetworkReply::readAll()-
176{-
177 QHttpNetworkReplyPrivate * const d = d_func();-
178 return
executed 76 times by 1 test: return d->responseData.readAll();
Executed by:
  • tst_QNetworkReply
d->responseData.readAll();
executed 76 times by 1 test: return d->responseData.readAll();
Executed by:
  • tst_QNetworkReply
76
179}-
180-
181QByteArray QHttpNetworkReply::read(qint64 amount)-
182{-
183 QHttpNetworkReplyPrivate * const d = d_func();-
184 return
executed 40 times by 1 test: return d->responseData.read(amount);
Executed by:
  • tst_QNetworkReply
d->responseData.read(amount);
executed 40 times by 1 test: return d->responseData.read(amount);
Executed by:
  • tst_QNetworkReply
40
185}-
186-
187-
188qint64 QHttpNetworkReply::sizeNextBlock()-
189{-
190 QHttpNetworkReplyPrivate * const d = d_func();-
191 return
executed 462 times by 1 test: return d->responseData.sizeNextBlock();
Executed by:
  • tst_QNetworkReply
d->responseData.sizeNextBlock();
executed 462 times by 1 test: return d->responseData.sizeNextBlock();
Executed by:
  • tst_QNetworkReply
462
192}-
193-
194void QHttpNetworkReply::setDownstreamLimited(bool dsl)-
195{-
196 QHttpNetworkReplyPrivate * const d = d_func();-
197 d->downstreamLimited = dsl;-
198 d->connection->d_func()->readMoreLater(this);-
199}
executed 20 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
20
200-
201void QHttpNetworkReply::setReadBufferSize(qint64 size)-
202{-
203 QHttpNetworkReplyPrivate * const d = d_func();-
204 d->readBufferMaxSize = size;-
205}
executed 18 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
18
206-
207bool QHttpNetworkReply::supportsUserProvidedDownloadBuffer()-
208{-
209 QHttpNetworkReplyPrivate * const d = d_func();-
210 return
executed 1084 times by 6 tests: return (!d->isChunked() && !d->autoDecompress && d->bodyLength > 0 && d->statusCode == 200);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(!d->isChunked() && !d->autoDecompress && d->bodyLength > 0 && d->statusCode == 200);
executed 1084 times by 6 tests: return (!d->isChunked() && !d->autoDecompress && d->bodyLength > 0 && d->statusCode == 200);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
1084
211}-
212-
213void QHttpNetworkReply::setUserProvidedDownloadBuffer(char* b)-
214{-
215 QHttpNetworkReplyPrivate * const d = d_func();-
216 if (supportsUserProvidedDownloadBuffer()
supportsUserPr...wnloadBuffer()Description
TRUEevaluated 364 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEnever evaluated
)
0-364
217 d->userProvidedDownloadBuffer = b;
executed 364 times by 3 tests: d->userProvidedDownloadBuffer = b;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
364
218}
executed 364 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
364
219-
220char* QHttpNetworkReply::userProvidedDownloadBuffer()-
221{-
222 QHttpNetworkReplyPrivate * const d = d_func();-
223 return
never executed: return d->userProvidedDownloadBuffer;
d->userProvidedDownloadBuffer;
never executed: return d->userProvidedDownloadBuffer;
0
224}-
225-
226void QHttpNetworkReply::abort()-
227{-
228 QHttpNetworkReplyPrivate * const d = d_func();-
229 d->state = QHttpNetworkReplyPrivate::Aborted;-
230}
executed 18 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
18
231-
232bool QHttpNetworkReply::isAborted() const-
233{-
234 return
executed 25 times by 3 tests: return d_func()->state == QHttpNetworkReplyPrivate::Aborted;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
d_func()->state == QHttpNetworkReplyPrivate::Aborted;
executed 25 times by 3 tests: return d_func()->state == QHttpNetworkReplyPrivate::Aborted;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
25
235}-
236-
237bool QHttpNetworkReply::isFinished() const-
238{-
239 return
executed 1301307 times by 3 tests: return d_func()->state == QHttpNetworkReplyPrivate::AllDoneState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
d_func()->state == QHttpNetworkReplyPrivate::AllDoneState;
executed 1301307 times by 3 tests: return d_func()->state == QHttpNetworkReplyPrivate::AllDoneState;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_QXmlInputSource
1301307
240}-
241-
242bool QHttpNetworkReply::isPipeliningUsed() const-
243{-
244 return
executed 911 times by 7 tests: return d_func()->pipeliningUsed;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
d_func()->pipeliningUsed;
executed 911 times by 7 tests: return d_func()->pipeliningUsed;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
911
245}-
246-
247bool QHttpNetworkReply::isSpdyUsed() const-
248{-
249 return
executed 794 times by 6 tests: return d_func()->spdyUsed;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
d_func()->spdyUsed;
executed 794 times by 6 tests: return d_func()->spdyUsed;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
794
250}-
251-
252void QHttpNetworkReply::setSpdyWasUsed(bool spdy)-
253{-
254 d_func()->spdyUsed = spdy;-
255}
executed 199 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
199
256-
257bool QHttpNetworkReply::isRedirecting() const-
258{-
259 return
executed 7 times by 1 test: return d_func()->isRedirecting();
Executed by:
  • tst_QNetworkReply
d_func()->isRedirecting();
executed 7 times by 1 test: return d_func()->isRedirecting();
Executed by:
  • tst_QNetworkReply
7
260}-
261-
262QHttpNetworkConnection* QHttpNetworkReply::connection()-
263{-
264 return
executed 10 times by 1 test: return d_func()->connection;
Executed by:
  • tst_QHttpNetworkConnection
d_func()->connection;
executed 10 times by 1 test: return d_func()->connection;
Executed by:
  • tst_QHttpNetworkConnection
10
265}-
266-
267-
268QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)-
269 : QHttpNetworkHeaderPrivate(newUrl)-
270 , state(NothingDoneState)-
271 , ssl(false)-
272 , statusCode(100),-
273 majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0),-
274 chunkedTransferEncoding(false),-
275 connectionCloseEnabled(true),-
276 forceConnectionCloseEnabled(false),-
277 lastChunkRead(false),-
278 currentChunkSize(0), currentChunkRead(0), readBufferMaxSize(0),-
279 windowSizeDownload(65536),-
280 windowSizeUpload(65536),-
281 currentlyReceivedDataInWindow(0),-
282 currentlyUploadedDataInWindow(0),-
283 totallyUploadedData(0),-
284 connection(0),-
285 autoDecompress(false), responseData(), requestIsPrepared(false)-
286 ,pipeliningUsed(false), spdyUsed(false), downstreamLimited(false)-
287 ,userProvidedDownloadBuffer(0)-
288-
289 ,inflateStrm(0)-
290-
291-
292{-
293 QString scheme = newUrl.scheme();-
294 if (scheme == QLatin1String("preconnect-http")
scheme == QLat...connect-http")Description
TRUEnever evaluated
FALSEevaluated 2205 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-2205
295 || scheme == QLatin1String("preconnect-https")
scheme == QLat...onnect-https")Description
TRUEnever evaluated
FALSEevaluated 2205 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
0-2205
296-
297 connectionCloseEnabled = false;
never executed: connectionCloseEnabled = false;
0
298}
executed 2205 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2205
299-
300QHttpNetworkReplyPrivate::~QHttpNetworkReplyPrivate()-
301{-
302-
303 if (inflateStrm
inflateStrmDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2026 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
7-2026
304 delete inflateStrm;
executed 7 times by 1 test: delete inflateStrm;
Executed by:
  • tst_QNetworkReply
7
305-
306}
executed 2033 times by 14 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2033
307-
308void QHttpNetworkReplyPrivate::clearHttpLayerInformation()-
309{-
310 state = NothingDoneState;-
311 statusCode = 100;-
312 bodyLength = 0;-
313 contentRead = 0;-
314 totalProgress = 0;-
315 currentChunkSize = 0;-
316 currentChunkRead = 0;-
317 lastChunkRead = false;-
318 connectionCloseEnabled = true;-
319-
320 if (autoDecompress
autoDecompressDescription
TRUEnever evaluated
FALSEevaluated 2308 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& inflateStrm
inflateStrmDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-2308
321 inflateEnd(inflateStrm);
never executed: inflateEnd(inflateStrm);
0
322-
323 fields.clear();-
324}
executed 2308 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2308
325-
326-
327void QHttpNetworkReplyPrivate::clear()-
328{-
329 connection = 0;-
330 connectionChannel = 0;-
331 autoDecompress = false;-
332 clearHttpLayerInformation();-
333}
executed 1789 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
1789
334-
335-
336qint64 QHttpNetworkReplyPrivate::bytesAvailable() const-
337{-
338 return
never executed: return (state != ReadingDataState ? 0 : fragment.size());
(state != ReadingDataState ? 0 : fragment.size());
never executed: return (state != ReadingDataState ? 0 : fragment.size());
0
339}-
340-
341bool QHttpNetworkReplyPrivate::isCompressed()-
342{-
343 QByteArray encoding = headerField("content-encoding");-
344 return
executed 3635 times by 8 tests: return qstricmp(encoding.constData(), "gzip") == 0 || qstricmp(encoding.constData(), "deflate") == 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
qstricmp(encoding.constData(), "gzip") == 0 || qstricmp(encoding.constData(), "deflate") == 0;
executed 3635 times by 8 tests: return qstricmp(encoding.constData(), "gzip") == 0 || qstricmp(encoding.constData(), "deflate") == 0;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
3635
345}-
346-
347void QHttpNetworkReplyPrivate::removeAutoDecompressHeader()-
348{-
349-
350-
351 QByteArray name("content-length");-
352 QList<QPair<QByteArray, QByteArray> >::Iterator it = fields.begin(),-
353 end = fields.end();-
354 while (it != end
it != endDescription
TRUEevaluated 29 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
2-29
355 if (qstricmp(name.constData(), it->first.constData()) == 0
qstricmp(name....stData()) == 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
5-24
356 fields.erase(it);-
357 break;
executed 5 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
5
358 }-
359 ++it;-
360 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
24
361-
362}
executed 7 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
7
363-
364bool QHttpNetworkReplyPrivate::findChallenge(bool forProxy, QByteArray &challenge) const-
365{-
366 challenge.clear();-
367-
368 QByteArray header = forProxy
forProxyDescription
TRUEnever evaluated
FALSEnever evaluated
? "proxy-authenticate" : "www-authenticate";
0
369-
370 QList<QByteArray> challenges = headerFieldValues(header);-
371 for (int i = 0; i<challenges.size()
i<challenges.size()Description
TRUEnever evaluated
FALSEnever evaluated
; i++) {
0
372 QByteArray line = challenges.at(i);-
373-
374 if (!line.toLower().startsWith("negotiate")
!line.toLower(...h("negotiate")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
375 challenge = line;
never executed: challenge = line;
0
376 }
never executed: end of block
0
377 return
never executed: return !challenge.isEmpty();
!challenge.isEmpty();
never executed: return !challenge.isEmpty();
0
378}-
379-
380QAuthenticatorPrivate::Method QHttpNetworkReplyPrivate::authenticationMethod(bool isProxy) const-
381{-
382-
383 QAuthenticatorPrivate::Method method = QAuthenticatorPrivate::None;-
384 QByteArray header = isProxy
isProxyDescription
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 302 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
? "proxy-authenticate" : "www-authenticate";
54-302
385 QList<QByteArray> challenges = headerFieldValues(header);-
386 for (int i = 0; i<challenges.size()
i<challenges.size()Description
TRUEevaluated 355 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 356 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
; i++) {
355-356
387 QByteArray line = challenges.at(i).trimmed().toLower();-
388 if (method < QAuthenticatorPrivate::Basic
method < QAuth...Private::BasicDescription
TRUEevaluated 355 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
0-355
389 && line.startsWith("basic")
line.startsWith("basic")Description
TRUEevaluated 286 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
69-286
390 method = QAuthenticatorPrivate::Basic;-
391 }
executed 286 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
else if (method < QAuthenticatorPrivate::Ntlm
method < QAuth...rPrivate::NtlmDescription
TRUEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
0-286
392 && line.startsWith("ntlm")
line.startsWith("ntlm")Description
TRUEnever evaluated
FALSEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
) {
0-69
393 method = QAuthenticatorPrivate::Ntlm;-
394 }
never executed: end of block
else if (method < QAuthenticatorPrivate::DigestMd5
method < QAuth...ate::DigestMd5Description
TRUEevaluated 69 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEnever evaluated
0-69
395 && line.startsWith("digest")
line.startsWith("digest")Description
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
2-67
396 method = QAuthenticatorPrivate::DigestMd5;-
397 }
executed 67 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
67
398 }
executed 355 times by 2 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
355
399 return
executed 356 times by 2 tests: return method;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
method;
executed 356 times by 2 tests: return method;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
356
400}-
401-
402qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)-
403{-
404 if (fragment.isEmpty()
fragment.isEmpty()Description
TRUEevaluated 2272 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
46-2272
405-
406 fragment.reserve(32);-
407 }
executed 2272 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2272
408-
409 qint64 bytes = 0;-
410 char c;-
411 qint64 haveRead = 0;-
412-
413 do {-
414 haveRead = socket->read(&c, 1);-
415 if (haveRead == -1
haveRead == -1Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 53098 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
24-53098
416 return
executed 24 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
-1;
executed 24 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
24
417 else if (haveRead == 0
haveRead == 0Description
TRUEevaluated 106 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 52992 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
106-52992
418 break;
executed 106 times by 2 tests: break;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
106
419 else if (haveRead == 1
haveRead == 1Description
TRUEevaluated 52992 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
&& fragment.size() == 0
fragment.size() == 0Description
TRUEevaluated 2230 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 50762 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& (c == 11
c == 11Description
TRUEnever evaluated
FALSEevaluated 2230 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| c == '\n'
c == '\n'Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2210 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| c == '\r'
c == '\r'Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2190 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| c == ' '
c == ' 'Description
TRUEnever evaluated
FALSEevaluated 2190 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| c == 31
c == 31Description
TRUEnever evaluated
FALSEevaluated 2190 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
))
0-52992
420 continue;
executed 40 times by 1 test: continue;
Executed by:
  • tst_QNetworkReply
40
421-
422 bytes++;-
423-
424-
425 if (c == '\n'
c == '\n'Description
TRUEevaluated 2160 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 50792 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
2160-50792
426-
427 if (fragment.endsWith('\r')
fragment.endsWith('\r')Description
TRUEevaluated 2152 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
8-2152
428 fragment.truncate(fragment.length()-1);-
429 }
executed 2152 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2152
430 bool ok = parseStatus(fragment);-
431 state = ReadingHeaderState;-
432 fragment.clear();-
433 if (!ok
!okDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2140 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
20-2140
434 return
executed 20 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
-1;
executed 20 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
20
435 }-
436 break;
executed 2140 times by 12 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2140
437 } else {-
438 fragment.append(c);-
439 }
executed 50792 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
50792
440-
441-
442 if (fragment.length() >= 5
fragment.length() >= 5Description
TRUEevaluated 42032 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 8760 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& !fragment.startsWith("HTTP/")
!fragment.startsWith("HTTP/")Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 42004 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
28-42032
443 {-
444 fragment.clear();-
445 return
executed 28 times by 2 tests: return -1;
Executed by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
-1;
executed 28 times by 2 tests: return -1;
Executed by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
28
446 }-
447 }
executed 50764 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
while (haveRead == 1
haveRead == 1Description
TRUEevaluated 50804 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
);
0-50804
448-
449 return
executed 2246 times by 12 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
bytes;
executed 2246 times by 12 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2246
450}-
451-
452bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)-
453{-
454-
455-
456-
457-
458-
459-
460 static const int minLength = 11;-
461 static const int dotPos = 6;-
462 static const int spacePos = 8;-
463 static const char httpMagic[] = "HTTP/";-
464-
465 if (status.length() < minLength
status.length() < minLengthDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2152 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
8-2152
466 || !status.startsWith(httpMagic)
!status.startsWith(httpMagic)Description
TRUEnever evaluated
FALSEevaluated 2152 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-2152
467 || status.at(dotPos) != '.'
status.at(dotPos) != '.'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2148 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
4-2148
468 || status.at(spacePos) != ' '
status.at(spacePos) != ' 'Description
TRUEnever evaluated
FALSEevaluated 2148 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-2148
469-
470 return
executed 12 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
false;
executed 12 times by 1 test: return false;
Executed by:
  • tst_QNetworkReply
12
471 }-
472-
473-
474 majorVersion = status.at(dotPos - 1) - '0';-
475 minorVersion = status.at(dotPos + 1) - '0';-
476-
477 int i = spacePos;-
478 int j = status.indexOf(' ', i + 1);-
479 const QByteArray code = status.mid(i + 1, j - i - 1);-
480-
481 bool ok;-
482 statusCode = code.toInt(&ok);-
483 reasonPhrase = QString::fromLatin1(status.constData() + j + 1);-
484-
485 return
executed 2148 times by 12 tests: return ok && uint(majorVersion) <= 9 && uint(minorVersion) <= 9;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
ok && uint(majorVersion) <= 9 && uint(minorVersion) <= 9;
executed 2148 times by 12 tests: return ok && uint(majorVersion) <= 9 && uint(minorVersion) <= 9;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2148
486}-
487-
488qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)-
489{-
490 if (fragment.isEmpty()
fragment.isEmpty()Description
TRUEevaluated 2145 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
70-2145
491-
492-
493-
494 fragment.reserve(512);-
495 }
executed 2145 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2145
496-
497 qint64 bytes = 0;-
498 char c = 0;-
499 bool allHeaders = false;-
500 qint64 haveRead = 0;-
501 do {-
502 haveRead = socket->read(&c, 1);-
503 if (haveRead == 0
haveRead == 0Description
TRUEevaluated 71 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 468289 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
71-468289
504-
505 break;
executed 71 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
71
506 } else if (haveRead == -1
haveRead == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 468283 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
6-468283
507-
508 return
executed 6 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
-1;
executed 6 times by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
6
509 } else {-
510 fragment.append(c);-
511 bytes++;-
512-
513 if (c == '\n'
c == '\n'Description
TRUEevaluated 16682 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 451601 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
16682-451601
514-
515-
516-
517 if (fragment.endsWith("\n\r\n")
fragment.endsWith("\n\r\n")Description
TRUEevaluated 1800 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 14882 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1800-14882
518 || fragment.endsWith("\n\n")
fragment.endsWith("\n\n")Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpnetworkreply - unknown status
FALSEevaluated 14877 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
5-14877
519 allHeaders = true;
executed 1805 times by 13 tests: allHeaders = true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1805
520-
521-
522 if ((fragment.length() == 2
fragment.length() == 2Description
TRUEevaluated 328 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 16354 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& fragment.endsWith("\r\n")
fragment.endsWith("\r\n")Description
TRUEevaluated 328 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
)
0-16354
523 || (fragment.length() == 1
fragment.length() == 1Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 16349 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& fragment.endsWith("\n")
fragment.endsWith("\n")Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
))
0-16349
524 allHeaders = true;
executed 333 times by 7 tests: allHeaders = true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
333
525 }
executed 16682 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
16682
526 }
executed 468283 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
468283
527 } while (!allHeaders
!allHeadersDescription
TRUEevaluated 466145 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2138 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& haveRead > 0
haveRead > 0Description
TRUEevaluated 466145 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
);
0-466145
528-
529-
530 if (allHeaders
allHeadersDescription
TRUEevaluated 2138 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 71 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
71-2138
531 parseHeader(fragment);-
532 state = ReadingDataState;-
533 fragment.clear();-
534 bodyLength = contentLength();-
535-
536-
537 chunkedTransferEncoding = headerField("transfer-encoding").toLower().contains("chunked");-
538-
539-
540 QByteArray connectionHeaderField = headerField("connection");-
541-
542 connectionCloseEnabled = (connectionHeaderField.toLower().contains("close")
connectionHead...tains("close")Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 2129 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
||
9-2129
543 headerField("proxy-connection").toLower().contains("close")
headerField("p...tains("close")Description
TRUEevaluated 225 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1904 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) ||
225-1904
544 (majorVersion == 1
majorVersion == 1Description
TRUEevaluated 1900 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qhttpnetworkreply - unknown status
&& minorVersion == 0
minorVersion == 0Description
TRUEevaluated 480 times by 8 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1420 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
&&
4-1900
545 (connectionHeaderField.isEmpty()
connectionHead...ield.isEmpty()Description
TRUEevaluated 465 times by 8 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&& !headerField("proxy-connection").toLower().contains("keep-alive")
!headerField("...("keep-alive")Description
TRUEevaluated 419 times by 8 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
));
15-465
546-
547-
548 if (autoDecompress
autoDecompressDescription
TRUEevaluated 1615 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 523 times by 9 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& isCompressed()
isCompressed()Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1608 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
) {
7-1615
549-
550 if (!inflateStrm
!inflateStrmDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-7
551 inflateStrm = new z_stream;
executed 7 times by 1 test: inflateStrm = new z_stream;
Executed by:
  • tst_QNetworkReply
7
552 int ret = initializeInflateStream();-
553 if (ret != 0
ret != 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-7
554 return
never executed: return -1;
-1;
never executed: return -1;
0
555 }
executed 7 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
7
556-
557-
558 }
executed 2138 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2138
559 return
executed 2209 times by 13 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
bytes;
executed 2209 times by 13 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2209
560}-
561-
562void QHttpNetworkReplyPrivate::parseHeader(const QByteArray &header)-
563{-
564-
565-
566 int i = 0;-
567 while (i < header.count()
i < header.count()Description
TRUEevaluated 16694 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qhttpnetworkreply - unknown status
) {
7-16694
568 int j = header.indexOf(':', i);-
569 if (j == -1
j == -1Description
TRUEevaluated 2138 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 14556 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
2138-14556
570 break;
executed 2138 times by 13 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2138
571 const QByteArray field = header.mid(i, j - i).trimmed();-
572 j++;-
573-
574 QByteArray value;-
575 do {-
576 i = header.indexOf('\n', j);-
577 if (i == -1
i == -1Description
TRUEnever evaluated
FALSEevaluated 14562 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
0-14562
578 break;
never executed: break;
0
579 if (!value.isEmpty()
!value.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpnetworkreply - unknown status
FALSEevaluated 14561 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
1-14561
580 value += ' ';
executed 1 time by 1 test: value += ' ';
Executed by:
  • tst_qhttpnetworkreply - unknown status
1
581-
582 bool hasCR = (i
iDescription
TRUEevaluated 14562 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
&& header[i-1] == '\r'
header[i-1] == '\r'Description
TRUEevaluated 14555 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpnetworkreply - unknown status
);
0-14562
583 int length = i -(hasCR
hasCRDescription
TRUEevaluated 14555 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpnetworkreply - unknown status
? 1: 0) - j;
7-14555
584 value += header.mid(j, length).trimmed();-
585 j = ++i;-
586 }
executed 14562 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
while (i < header.count()
i < header.count()Description
TRUEevaluated 14555 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_qhttpnetworkreply - unknown status
&& (header.at(i) == ' '
header.at(i) == ' 'Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qhttpnetworkreply - unknown status
FALSEevaluated 14549 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| header.at(i) == '\t'
header.at(i) == '\t'Description
TRUEnever evaluated
FALSEevaluated 14549 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
));
0-14562
587 if (i == -1
i == -1Description
TRUEnever evaluated
FALSEevaluated 14556 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
0-14556
588 break;
never executed: break;
0
589-
590 fields.append(qMakePair(field, value));-
591 }
executed 14556 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
14556
592}
executed 2145 times by 13 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpnetworkreply - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2145
593-
594bool QHttpNetworkReplyPrivate::isChunked()-
595{-
596 return
executed 16719 times by 7 tests: return chunkedTransferEncoding;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
chunkedTransferEncoding;
executed 16719 times by 7 tests: return chunkedTransferEncoding;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
16719
597}-
598-
599bool QHttpNetworkReplyPrivate::isConnectionCloseEnabled()-
600{-
601 return
executed 3308 times by 8 tests: return connectionCloseEnabled || forceConnectionCloseEnabled;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
connectionCloseEnabled || forceConnectionCloseEnabled;
executed 3308 times by 8 tests: return connectionCloseEnabled || forceConnectionCloseEnabled;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
3308
602}-
603-
604-
605-
606qint64 QHttpNetworkReplyPrivate::readBodyVeryFast(QAbstractSocket *socket, char *b)-
607{-
608-
609 qint64 haveRead = 0;-
610 haveRead = socket->read(b, bodyLength - contentRead);-
611 if (haveRead == -1
haveRead == -1Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 2655 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
2-2655
612 return
executed 2 times by 2 tests: return -1;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
-1;
executed 2 times by 2 tests: return -1;
Executed by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
2
613 }-
614 contentRead += haveRead;-
615-
616 if (contentRead == bodyLength
contentRead == bodyLengthDescription
TRUEevaluated 346 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
FALSEevaluated 2309 times by 2 tests
Evaluated by:
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
) {
346-2309
617 state = AllDoneState;-
618 }
executed 346 times by 3 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
346
619-
620 return
executed 2655 times by 3 tests: return haveRead;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
haveRead;
executed 2655 times by 3 tests: return haveRead;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
2655
621}-
622-
623-
624-
625qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QByteDataBuffer *rb)-
626{-
627-
628 qint64 toBeRead = qMin(socket->bytesAvailable(), bodyLength - contentRead);-
629 if (readBufferMaxSize
readBufferMaxSizeDescription
TRUEevaluated 453 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 14233 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
)
453-14233
630 toBeRead = qMin(toBeRead, readBufferMaxSize);
executed 453 times by 1 test: toBeRead = qMin(toBeRead, readBufferMaxSize);
Executed by:
  • tst_QNetworkReply
453
631-
632 if (!toBeRead
!toBeReadDescription
TRUEevaluated 6882 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
FALSEevaluated 7804 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
)
6882-7804
633 return
executed 6882 times by 3 tests: return 0;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
0;
executed 6882 times by 3 tests: return 0;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
6882
634-
635 QByteArray bd;-
636 bd.resize(toBeRead);-
637 qint64 haveRead = socket->read(bd.data(), toBeRead);-
638 if (haveRead == -1
haveRead == -1Description
TRUEnever evaluated
FALSEevaluated 7804 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
) {
0-7804
639 bd.clear();-
640 return
never executed: return 0;
0;
never executed: return 0;
0
641 }-
642 bd.resize(haveRead);-
643-
644 rb->append(bd);-
645-
646 if (contentRead + haveRead == bodyLength
contentRead + ... == bodyLengthDescription
TRUEevaluated 968 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
FALSEevaluated 6836 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
) {
968-6836
647 state = AllDoneState;-
648 }
executed 968 times by 3 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
968
649-
650 contentRead += haveRead;-
651 return
executed 7804 times by 3 tests: return haveRead;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
haveRead;
executed 7804 times by 3 tests: return haveRead;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkReply
7804
652}-
653-
654-
655qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QByteDataBuffer *out)-
656{-
657 qint64 bytes = 0;-
658-
659-
660-
661 QByteDataBuffer *tempOutDataBuffer = (autoDecompress
autoDecompressDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 457 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
? new QByteDataBuffer : out);
15-457
662-
663-
664-
665-
666-
667 if (isChunked()
isChunked()Description
TRUEevaluated 443 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 29 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
29-443
668-
669 bytes += readReplyBodyChunked(socket, tempOutDataBuffer);-
670 }
executed 443 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
else if (bodyLength > 0
bodyLength > 0Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
9-443
671-
672 bytes += readReplyBodyRaw(socket, tempOutDataBuffer, bodyLength - contentRead);-
673 if (contentRead + bytes == bodyLength
contentRead + ... == bodyLengthDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
4-5
674 state = AllDoneState;
executed 4 times by 1 test: state = AllDoneState;
Executed by:
  • tst_QNetworkReply
4
675 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
else {
9
676-
677 bytes += readReplyBodyRaw(socket, tempOutDataBuffer, socket->bytesAvailable());-
678 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
20
679-
680-
681-
682 if (autoDecompress
autoDecompressDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 457 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
15-457
683 qint64 uncompressRet = uncompressBodyData(tempOutDataBuffer, out);-
684 delete tempOutDataBuffer;-
685 if (uncompressRet < 0
uncompressRet < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
1-14
686 return
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
-1;
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
1
687 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
14
688-
689-
690 contentRead += bytes;-
691 return
executed 471 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
bytes;
executed 471 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
471
692}-
693-
694-
695int QHttpNetworkReplyPrivate::initializeInflateStream()-
696{-
697 inflateStrm->zalloc = 0;-
698 inflateStrm->zfree = 0;-
699 inflateStrm->opaque = 0;-
700 inflateStrm->avail_in = 0;-
701 inflateStrm->next_in = 0;-
702-
703-
704-
705 int ret = inflateInit2_((inflateStrm), (15 +32), "1.2.8", (int)sizeof(z_stream));-
706 ((!(ret == 0)) ? qt_assert("ret == Z_OK",__FILE__,751) : qt_noop());-
707 return
executed 7 times by 1 test: return ret;
Executed by:
  • tst_QNetworkReply
ret;
executed 7 times by 1 test: return ret;
Executed by:
  • tst_QNetworkReply
7
708}-
709-
710qint64 QHttpNetworkReplyPrivate::uncompressBodyData(QByteDataBuffer *in, QByteDataBuffer *out)-
711{-
712 if (!inflateStrm
!inflateStrmDescription
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-15
713 inflateStrm = new z_stream;-
714 initializeInflateStream();-
715 }
never executed: end of block
0
716-
717 if (!inflateStrm
!inflateStrmDescription
TRUEnever evaluated
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
0-15
718 return
never executed: return -1;
-1;
never executed: return -1;
0
719-
720 bool triedRawDeflate = false;-
721 for (int i = 0; i < in->bufferCount()
i < in->bufferCount()Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
; i++) {
10-17
722 QByteArray &bIn = (*in)[i];-
723-
724 inflateStrm->avail_in = bIn.size();-
725 inflateStrm->next_in = reinterpret_cast<Bytef*>(bIn.data());-
726-
727 do {-
728 QByteArray bOut;-
729-
730 bOut.reserve(inflateStrm->avail_in * 3 + 512);-
731 inflateStrm->avail_out = bOut.capacity();-
732 inflateStrm->next_out = reinterpret_cast<Bytef*>(bOut.data());-
733-
734 int ret = inflate(inflateStrm, 0);-
735-
736-
737 if (ret == (-3)
ret == (-3)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
&& !triedRawDeflate
!triedRawDeflateDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
1-59
738 inflateEnd(inflateStrm);-
739 triedRawDeflate = true;-
740 inflateStrm->zalloc = 0;-
741 inflateStrm->zfree = 0;-
742 inflateStrm->opaque = 0;-
743 inflateStrm->avail_in = 0;-
744 inflateStrm->next_in = 0;-
745 int ret = inflateInit2_((inflateStrm), (-15), "1.2.8", (int)sizeof(z_stream));-
746 if (ret != 0
ret != 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-1
747 return
never executed: return -1;
-1;
never executed: return -1;
0
748 } else {-
749 inflateStrm->avail_in = bIn.size();-
750 inflateStrm->next_in = reinterpret_cast<Bytef*>(bIn.data());-
751 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QNetworkReply
1
752 }-
753 } else if (ret < 0
ret < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
|| ret == 2
ret == 2Description
TRUEnever evaluated
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_QNetworkReply
) {
0-59
754 return
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
-1;
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QNetworkReply
1
755 }-
756 bOut.resize(bOut.capacity() - inflateStrm->avail_out);-
757 out->append(bOut);-
758 if (ret == 1
ret == 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 55 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
4-55
759 return
executed 4 times by 1 test: return out->byteAmount();
Executed by:
  • tst_QNetworkReply
out->byteAmount();
executed 4 times by 1 test: return out->byteAmount();
Executed by:
  • tst_QNetworkReply
4
760 }
executed 55 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
while (inflateStrm->avail_in > 0
inflateStrm->avail_in > 0Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QNetworkReply
);
12-55
761 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
12
762-
763 return
executed 10 times by 1 test: return out->byteAmount();
Executed by:
  • tst_QNetworkReply
out->byteAmount();
executed 10 times by 1 test: return out->byteAmount();
Executed by:
  • tst_QNetworkReply
10
764}-
765-
766-
767qint64 QHttpNetworkReplyPrivate::readReplyBodyRaw(QAbstractSocket *socket, QByteDataBuffer *out, qint64 size)-
768{-
769-
770 qint64 bytes = 0;-
771 ((!(socket)) ? qt_assert("socket",__FILE__,816) : qt_noop());-
772 ((!(out)) ? qt_assert("out",__FILE__,817) : qt_noop());-
773-
774 int toBeRead = qMin<qint64>(128*1024, qMin<qint64>(size, socket->bytesAvailable()));-
775-
776 if (readBufferMaxSize
readBufferMaxSizeDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 208 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
9-208
777 toBeRead = qMin<qint64>(toBeRead, readBufferMaxSize);
executed 9 times by 1 test: toBeRead = qMin<qint64>(toBeRead, readBufferMaxSize);
Executed by:
  • tst_QNetworkReply
9
778-
779 while (toBeRead > 0
toBeRead > 0Description
TRUEevaluated 187 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 217 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
187-217
780 QByteArray byteData;-
781 byteData.resize(toBeRead);-
782 qint64 haveRead = socket->read(byteData.data(), byteData.size());-
783 if (haveRead <= 0
haveRead <= 0Description
TRUEnever evaluated
FALSEevaluated 187 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
0-187
784-
785 byteData.clear();-
786 return
never executed: return bytes;
bytes;
never executed: return bytes;
0
787 }-
788-
789 byteData.resize(haveRead);-
790 out->append(byteData);-
791 bytes += haveRead;-
792 size -= haveRead;-
793-
794 toBeRead = qMin<qint64>(128*1024, qMin<qint64>(size, socket->bytesAvailable()));-
795 }
executed 187 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
187
796 return
executed 217 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
bytes;
executed 217 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
217
797-
798}-
799-
800qint64 QHttpNetworkReplyPrivate::readReplyBodyChunked(QAbstractSocket *socket, QByteDataBuffer *out)-
801{-
802 qint64 bytes = 0;-
803 while (socket->bytesAvailable()
socket->bytesAvailable()Description
TRUEevaluated 409 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 222 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
222-409
804-
805 if (readBufferMaxSize
readBufferMaxSizeDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 396 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
&& (
(bytes > readBufferMaxSize)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
bytes > readBufferMaxSize)
(bytes > readBufferMaxSize)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QNetworkReply
)
3-396
806 break;
executed 3 times by 1 test: break;
Executed by:
  • tst_QNetworkReply
3
807-
808 if (!lastChunkRead
!lastChunkReadDescription
TRUEevaluated 406 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& currentChunkRead >= currentChunkSize
currentChunkRe...rrentChunkSizeDescription
TRUEevaluated 361 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 45 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
0-406
809-
810 currentChunkSize = 0;-
811 currentChunkRead = 0;-
812 if (bytes
bytesDescription
TRUEevaluated 127 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 234 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
127-234
813-
814 char crlf[2];-
815-
816 qint64 haveRead = socket->read(crlf, 2);-
817-
818-
819-
820-
821 if (haveRead != 2
haveRead != 2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 126 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
1-126
822 return
executed 1 time by 1 test: return bytes;
Executed by:
  • tst_QNetworkReply
bytes;
executed 1 time by 1 test: return bytes;
Executed by:
  • tst_QNetworkReply
1
823 bytes += haveRead;-
824 }
executed 126 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
126
825-
826 bytes += getChunkSize(socket, &currentChunkSize);-
827 if (currentChunkSize == -1
currentChunkSize == -1Description
TRUEevaluated 97 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 263 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
)
97-263
828 break;
executed 97 times by 4 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
97
829 }
executed 263 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
263
830-
831 if (currentChunkSize == 0
currentChunkSize == 0Description
TRUEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 188 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
|| lastChunkRead
lastChunkReadDescription
TRUEnever evaluated
FALSEevaluated 188 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
0-188
832 lastChunkRead = true;-
833-
834 char crlf[2];-
835 qint64 haveRead = socket->read(crlf, 2);-
836 if (haveRead > 0
haveRead > 0Description
TRUEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-120
837 bytes += haveRead;
executed 120 times by 4 tests: bytes += haveRead;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
120
838-
839 if ((haveRead == 2
haveRead == 2Description
TRUEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& crlf[0] == '\r'
crlf[0] == '\r'Description
TRUEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& crlf[1] == '\n'
crlf[1] == '\n'Description
TRUEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) || (haveRead == 1
haveRead == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& crlf[0] == '\n'
crlf[0] == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
))
0-120
840 state = AllDoneState;
executed 120 times by 4 tests: state = AllDoneState;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
120
841 else if (haveRead == 1
haveRead == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& crlf[0] == '\r'
crlf[0] == '\r'Description
TRUEnever evaluated
FALSEnever evaluated
)
0
842 break;
never executed: break;
0
843 else if (haveRead > 0
haveRead > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
844-
845 forceConnectionCloseEnabled = true;-
846 state = AllDoneState;-
847 }
never executed: end of block
0
848 break;
executed 120 times by 4 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
120
849 }-
850-
851-
852 qint64 haveRead = readReplyBodyRaw (socket, out, currentChunkSize - currentChunkRead);-
853 currentChunkRead += haveRead;-
854 bytes += haveRead;-
855-
856-
857-
858 }
executed 188 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
188
859 return
executed 442 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
bytes;
executed 442 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
442
860}-
861-
862qint64 QHttpNetworkReplyPrivate::getChunkSize(QAbstractSocket *socket, qint64 *chunkSize)-
863{-
864 qint64 bytes = 0;-
865 char crlf[2];-
866 *chunkSize = -1;-
867-
868 int bytesAvailable = socket->bytesAvailable();-
869-
870 while (bytesAvailable > bytes
bytesAvailable > bytesDescription
TRUEevaluated 664 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 97 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
97-664
871 qint64 sniffedBytes = socket->peek(crlf, 2);-
872 int fragmentSize = fragment.size();-
873-
874-
875 if ((fragmentSize
fragmentSizeDescription
TRUEevaluated 401 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 263 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
&& sniffedBytes == 2
sniffedBytes == 2Description
TRUEevaluated 388 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
&& crlf[0] == '\r'
crlf[0] == '\r'Description
TRUEevaluated 263 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 125 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
&& crlf[1] == '\n'
crlf[1] == '\n'Description
TRUEevaluated 263 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-401
876 ||(fragmentSize > 1
fragmentSize > 1Description
TRUEevaluated 73 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 328 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
&& fragment.endsWith('\r')
fragment.endsWith('\r')Description
TRUEnever evaluated
FALSEevaluated 73 times by 3 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
&& crlf[0] == '\n'
crlf[0] == '\n'Description
TRUEnever evaluated
FALSEnever evaluated
))
0-328
877 {-
878 bytes += socket->read(crlf, 1);-
879 if (crlf[0] == '\r'
crlf[0] == '\r'Description
TRUEevaluated 263 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-263
880 bytes += socket->read(crlf, 1);
executed 263 times by 4 tests: bytes += socket->read(crlf, 1);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
263
881 bool ok = false;-
882-
883 fragment = fragment.mid(0, fragment.indexOf(';')).trimmed();-
884 *chunkSize = fragment.toLong(&ok, 16);-
885 fragment.clear();-
886 break;
executed 263 times by 4 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
263
887 } else {-
888-
889 char c = 0;-
890 qint64 haveRead = socket->read(&c, 1);-
891 if (haveRead < 0
haveRead < 0Description
TRUEnever evaluated
FALSEevaluated 401 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
0-401
892 return
never executed: return -1;
-1;
never executed: return -1;
0
893 }-
894 bytes += haveRead;-
895 fragment.append(c);-
896 }
executed 401 times by 4 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
401
897 }-
898-
899 return
executed 360 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
bytes;
executed 360 times by 4 tests: return bytes;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
360
900}-
901-
902bool QHttpNetworkReplyPrivate::isRedirecting() const-
903{-
904-
905-
906 return
executed 7 times by 1 test: return (QHttpNetworkReply::isHttpRedirect(statusCode) && request.isFollowRedirects());
Executed by:
  • tst_QNetworkReply
(QHttpNetworkReply::isHttpRedirect(statusCode)
executed 7 times by 1 test: return (QHttpNetworkReply::isHttpRedirect(statusCode) && request.isFollowRedirects());
Executed by:
  • tst_QNetworkReply
7
907 && request.isFollowRedirects());
executed 7 times by 1 test: return (QHttpNetworkReply::isHttpRedirect(statusCode) && request.isFollowRedirects());
Executed by:
  • tst_QNetworkReply
7
908}-
909-
910bool QHttpNetworkReplyPrivate::shouldEmitSignals()-
911{-
912-
913-
914 return
executed 18943 times by 7 tests: return (statusCode != 401 && statusCode != 407);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
(statusCode != 401 && statusCode != 407);
executed 18943 times by 7 tests: return (statusCode != 401 && statusCode != 407);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
18943
915}-
916-
917bool QHttpNetworkReplyPrivate::expectContent()-
918{-
919-
920 if ((statusCode >= 100
statusCode >= 100Description
TRUEevaluated 1622 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
&& statusCode < 200
statusCode < 200Description
TRUEnever evaluated
FALSEevaluated 1622 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
0-1622
921 || statusCode == 204
statusCode == 204Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 1618 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
|| statusCode == 304
statusCode == 304Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkReply
FALSEevaluated 1609 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
4-1618
922 return
executed 13 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
false;
executed 13 times by 3 tests: return false;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
13
923 if (request.operation() == QHttpNetworkRequest::Head
request.operat...kRequest::HeadDescription
TRUEevaluated 107 times by 2 tests
Evaluated by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
FALSEevaluated 1502 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_Spdy
)
107-1502
924 return
executed 107 times by 2 tests: return false;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
false;
executed 107 times by 2 tests: return false;
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
107
925 qint64 expectedContentLength = contentLength();-
926 if (expectedContentLength == 0
expectedContentLength == 0Description
TRUEevaluated 31 times by 2 tests
Evaluated by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
FALSEevaluated 1471 times by 6 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
)
31-1471
927 return
executed 31 times by 2 tests: return false;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
false;
executed 31 times by 2 tests: return false;
Executed by:
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
31
928 if (expectedContentLength == -1
expectedContentLength == -1Description
TRUEevaluated 147 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 1324 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
&& bodyLength == 0
bodyLength == 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 146 times by 4 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkReply
  • tst_Spdy
) {
1-1324
929-
930-
931 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_QNetworkReply
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_QNetworkReply
1
932 }-
933 return
executed 1470 times by 6 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
true;
executed 1470 times by 6 tests: return true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
1470
934}-
935-
936void QHttpNetworkReplyPrivate::eraseData()-
937{-
938 compressedData.clear();-
939 responseData.clear();-
940}
executed 323 times by 4 tests: end of block
Executed by:
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_Spdy
323
941-
942-
943-
944-
945-
946QSslConfiguration QHttpNetworkReply::sslConfiguration() const-
947{-
948 const QHttpNetworkReplyPrivate * const d = d_func();-
949-
950 if (!d->connectionChannel
!d->connectionChannelDescription
TRUEnever evaluated
FALSEevaluated 526 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
0-526
951 return
never executed: return QSslConfiguration();
QSslConfiguration();
never executed: return QSslConfiguration();
0
952-
953 QSslSocket *sslSocket = qobject_cast<QSslSocket*>(d->connectionChannel->socket);-
954 if (!sslSocket
!sslSocketDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_Spdy
FALSEevaluated 524 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
2-524
955 return
executed 2 times by 1 test: return QSslConfiguration();
Executed by:
  • tst_Spdy
QSslConfiguration();
executed 2 times by 1 test: return QSslConfiguration();
Executed by:
  • tst_Spdy
2
956-
957 return
executed 524 times by 2 tests: return sslSocket->sslConfiguration();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
sslSocket->sslConfiguration();
executed 524 times by 2 tests: return sslSocket->sslConfiguration();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
524
958}-
959-
960void QHttpNetworkReply::setSslConfiguration(const QSslConfiguration &config)-
961{-
962 QHttpNetworkReplyPrivate * const d = d_func();-
963 if (d->connection
d->connectionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
964 d->connection->setSslConfiguration(config);
never executed: d->connection->setSslConfiguration(config);
0
965}
never executed: end of block
0
966-
967void QHttpNetworkReply::ignoreSslErrors()-
968{-
969 QHttpNetworkReplyPrivate * const d = d_func();-
970 if (d->connection
d->connectionDescription
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
)
0-32
971 d->connection->ignoreSslErrors();
executed 32 times by 2 tests: d->connection->ignoreSslErrors();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
32
972}
executed 32 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
32
973-
974void QHttpNetworkReply::ignoreSslErrors(const QList<QSslError> &errors)-
975{-
976 QHttpNetworkReplyPrivate * const d = d_func();-
977 if (d->connection
d->connectionDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEnever evaluated
)
0-6
978 d->connection->ignoreSslErrors(errors);
executed 6 times by 1 test: d->connection->ignoreSslErrors(errors);
Executed by:
  • tst_QNetworkReply
6
979}
executed 6 times by 1 test: end of block
Executed by:
  • tst_QNetworkReply
6
980-
981-
982-
983-
984-
985-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9