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