qhttpsocketengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/socket/qhttpsocketengine.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtNetwork module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qhttpsocketengine_p.h"-
41#include "qtcpsocket.h"-
42#include "qhostaddress.h"-
43#include "qurl.h"-
44#include "private/qhttpnetworkreply_p.h"-
45#include "private/qiodevice_p.h"-
46#include "qelapsedtimer.h"-
47#include "qnetworkinterface.h"-
48-
49#if !defined(QT_NO_NETWORKPROXY) && !defined(QT_NO_HTTP)-
50#include <qdebug.h>-
51-
52QT_BEGIN_NAMESPACE-
53-
54#define DEBUG-
55-
56QHttpSocketEngine::QHttpSocketEngine(QObject *parent)-
57 : QAbstractSocketEngine(*new QHttpSocketEnginePrivate, parent)-
58{-
59}
executed 375 times by 7 tests: end of block
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
375
60-
61QHttpSocketEngine::~QHttpSocketEngine()-
62{-
63}-
64-
65bool QHttpSocketEngine::initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol)-
66{-
67 Q_D(QHttpSocketEngine);-
68 if (type != QAbstractSocket::TcpSocket)
type != QAbstr...ket::TcpSocketDescription
TRUEnever evaluated
FALSEevaluated 375 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-375
69 return false;
never executed: return false;
0
70-
71 setProtocol(protocol);-
72 setSocketType(type);-
73 d->socket = new QTcpSocket(this);-
74 d->reply = new QHttpNetworkReply(QUrl(), this);-
75#ifndef QT_NO_BEARERMANAGEMENT-
76 d->socket->setProperty("_q_networkSession", property("_q_networkSession"));-
77#endif-
78-
79 // Explicitly disable proxying on the proxy socket itself to avoid-
80 // unwanted recursion.-
81 d->socket->setProxy(QNetworkProxy::NoProxy);-
82-
83 // Intercept all the signals.-
84 connect(d->socket, SIGNAL(connected()),-
85 this, SLOT(slotSocketConnected()),-
86 Qt::DirectConnection);-
87 connect(d->socket, SIGNAL(disconnected()),-
88 this, SLOT(slotSocketDisconnected()),-
89 Qt::DirectConnection);-
90 connect(d->socket, SIGNAL(readyRead()),-
91 this, SLOT(slotSocketReadNotification()),-
92 Qt::DirectConnection);-
93 connect(d->socket, SIGNAL(bytesWritten(qint64)),-
94 this, SLOT(slotSocketBytesWritten()),-
95 Qt::DirectConnection);-
96 connect(d->socket, SIGNAL(error(QAbstractSocket::SocketError)),-
97 this, SLOT(slotSocketError(QAbstractSocket::SocketError)),-
98 Qt::DirectConnection);-
99 connect(d->socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)),-
100 this, SLOT(slotSocketStateChanged(QAbstractSocket::SocketState)),-
101 Qt::DirectConnection);-
102-
103 return true;
executed 375 times by 7 tests: return 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
375
104}-
105-
106bool QHttpSocketEngine::initialize(qintptr, QAbstractSocket::SocketState)-
107{-
108 return false;
never executed: return false;
0
109}-
110-
111void QHttpSocketEngine::setProxy(const QNetworkProxy &proxy)-
112{-
113 Q_D(QHttpSocketEngine);-
114 d->proxy = proxy;-
115 QString user = proxy.user();-
116 if (!user.isEmpty())
!user.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 368 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
6-368
117 d->authenticator.setUser(user);
executed 6 times by 1 test: d->authenticator.setUser(user);
Executed by:
  • tst_qhttpsocketengine - unknown status
6
118 QString password = proxy.password();-
119 if (!password.isEmpty())
!password.isEmpty()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 368 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
6-368
120 d->authenticator.setPassword(password);
executed 6 times by 1 test: d->authenticator.setPassword(password);
Executed by:
  • tst_qhttpsocketengine - unknown status
6
121}
executed 374 times by 7 tests: end of block
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
374
122-
123qintptr QHttpSocketEngine::socketDescriptor() const-
124{-
125 Q_D(const QHttpSocketEngine);-
126 return d->socket ? d->socket->socketDescriptor() : -1;
executed 635 times by 7 tests: return d->socket ? d->socket->socketDescriptor() : -1;
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
635
127}-
128-
129bool QHttpSocketEngine::isValid() const-
130{-
131 Q_D(const QHttpSocketEngine);-
132 return d->socket;
executed 12703 times by 7 tests: return d->socket;
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
12703
133}-
134-
135bool QHttpSocketEngine::connectInternal()-
136{-
137 Q_D(QHttpSocketEngine);-
138-
139 d->credentialsSent = false;-
140-
141 // If the handshake is done, enter ConnectedState state and return true.-
142 if (d->state == Connected) {
d->state == ConnectedDescription
TRUEnever evaluated
FALSEevaluated 374 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-374
143 qWarning("QHttpSocketEngine::connectToHost: called when already connected");-
144 setState(QAbstractSocket::ConnectedState);-
145 return true;
never executed: return true;
0
146 }-
147-
148 if (d->state == ConnectSent && d->socketState != QAbstractSocket::ConnectedState)
d->state == ConnectSentDescription
TRUEnever evaluated
FALSEevaluated 374 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socketState...ConnectedStateDescription
TRUEnever evaluated
FALSEnever evaluated
0-374
149 setState(QAbstractSocket::UnconnectedState);
never executed: setState(QAbstractSocket::UnconnectedState);
0
150-
151 // Handshake isn't done. If unconnected, start connecting.-
152 if (d->state == None && d->socket->state() == QAbstractSocket::UnconnectedState) {
d->state == NoneDescription
TRUEevaluated 374 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
d->socket->sta...connectedStateDescription
TRUEevaluated 374 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-374
153 setState(QAbstractSocket::ConnectingState);-
154 //limit buffer in internal socket, data is buffered in the external socket under application control-
155 d->socket->setReadBufferSize(65536);-
156 d->socket->connectToHost(d->proxy.hostName(), d->proxy.port());-
157 }
executed 374 times by 7 tests: end of block
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
374
158-
159 // If connected (might happen right away, at least for localhost services-
160 // on some BSD systems), there might already be bytes available.-
161 if (bytesAvailable())
bytesAvailable()Description
TRUEnever evaluated
FALSEevaluated 374 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-374
162 slotSocketReadNotification();
never executed: slotSocketReadNotification();
0
163-
164 return d->socketState == QAbstractSocket::ConnectedState;
executed 374 times by 7 tests: return d->socketState == QAbstractSocket::ConnectedState;
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
374
165}-
166-
167bool QHttpSocketEngine::connectToHost(const QHostAddress &address, quint16 port)-
168{-
169 Q_D(QHttpSocketEngine);-
170-
171 setPeerAddress(address);-
172 setPeerPort(port);-
173 d->peerName.clear();-
174-
175 return connectInternal();
executed 49 times by 4 tests: return connectInternal();
Executed by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
49
176}-
177-
178bool QHttpSocketEngine::connectToHostByName(const QString &hostname, quint16 port)-
179{-
180 Q_D(QHttpSocketEngine);-
181-
182 setPeerAddress(QHostAddress());-
183 setPeerPort(port);-
184 d->peerName = hostname;-
185-
186 return connectInternal();
executed 325 times by 6 tests: return connectInternal();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
325
187}-
188-
189bool QHttpSocketEngine::bind(const QHostAddress &, quint16)-
190{-
191 qWarning("Operation is not supported");-
192 setError(QAbstractSocket::UnsupportedSocketOperationError,-
193 QLatin1String("Unsupported socket operation"));-
194 return false;
never executed: return false;
0
195}-
196-
197bool QHttpSocketEngine::listen()-
198{-
199 qWarning("Operation is not supported");-
200 setError(QAbstractSocket::UnsupportedSocketOperationError,-
201 QLatin1String("Unsupported socket operation"));-
202 return false;
never executed: return false;
0
203}-
204-
205int QHttpSocketEngine::accept()-
206{-
207 qWarning("Operation is not supported");-
208 setError(QAbstractSocket::UnsupportedSocketOperationError,-
209 QLatin1String("Unsupported socket operation"));-
210 return -1;
never executed: return -1;
0
211}-
212-
213void QHttpSocketEngine::close()-
214{-
215 Q_D(QHttpSocketEngine);-
216 if (d->socket) {
d->socketDescription
TRUEevaluated 339 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 89 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
89-339
217 d->socket->close();-
218 delete d->socket;-
219 d->socket = 0;-
220 }
executed 339 times by 7 tests: end of block
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
339
221}
executed 428 times by 7 tests: end of block
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
428
222-
223qint64 QHttpSocketEngine::bytesAvailable() const-
224{-
225 Q_D(const QHttpSocketEngine);-
226 return d->socket ? d->socket->bytesAvailable() : 0;
executed 3980 times by 7 tests: return d->socket ? d->socket->bytesAvailable() : 0;
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
3980
227}-
228-
229qint64 QHttpSocketEngine::read(char *data, qint64 maxlen)-
230{-
231 Q_D(QHttpSocketEngine);-
232 qint64 bytesRead = d->socket->read(data, maxlen);-
233-
234 if (d->socket->state() == QAbstractSocket::UnconnectedState
d->socket->sta...connectedStateDescription
TRUEevaluated 91 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 3178 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
91-3178
235 && d->socket->bytesAvailable() == 0) {
d->socket->byt...ailable() == 0Description
TRUEevaluated 91 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-91
236 emitReadNotification();-
237 }
executed 91 times by 3 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
91
238-
239 if (bytesRead == -1) {
bytesRead == -1Description
TRUEevaluated 91 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 3178 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
91-3178
240 // If nothing has been read so far, and the direct socket read-
241 // failed, return the socket's error. Otherwise, fall through and-
242 // return as much as we read so far.-
243 close();-
244 setError(QAbstractSocket::RemoteHostClosedError,-
245 QLatin1String("Remote host closed"));-
246 setState(QAbstractSocket::UnconnectedState);-
247 return -1;
executed 91 times by 3 tests: return -1;
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
91
248 }-
249 return bytesRead;
executed 3178 times by 7 tests: return bytesRead;
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
3178
250}-
251-
252qint64 QHttpSocketEngine::write(const char *data, qint64 len)-
253{-
254 Q_D(QHttpSocketEngine);-
255 return d->socket->write(data, len);
executed 414 times by 7 tests: return d->socket->write(data, len);
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
414
256}-
257-
258#ifndef QT_NO_UDPSOCKET-
259#ifndef QT_NO_NETWORKINTERFACE-
260bool QHttpSocketEngine::joinMulticastGroup(const QHostAddress &,-
261 const QNetworkInterface &)-
262{-
263 qWarning("Operation is not supported");-
264 setError(QAbstractSocket::UnsupportedSocketOperationError,-
265 QLatin1String("Unsupported socket operation"));-
266 return false;
never executed: return false;
0
267}-
268-
269bool QHttpSocketEngine::leaveMulticastGroup(const QHostAddress &,-
270 const QNetworkInterface &)-
271{-
272 qWarning("Operation is not supported");-
273 setError(QAbstractSocket::UnsupportedSocketOperationError,-
274 QLatin1String("Unsupported socket operation"));-
275 return false;
never executed: return false;
0
276}-
277-
278QNetworkInterface QHttpSocketEngine::multicastInterface() const-
279{-
280 return QNetworkInterface();
never executed: return QNetworkInterface();
0
281}-
282-
283bool QHttpSocketEngine::setMulticastInterface(const QNetworkInterface &)-
284{-
285 qWarning("Operation is not supported");-
286 setError(QAbstractSocket::UnsupportedSocketOperationError,-
287 QLatin1String("Unsupported socket operation"));-
288 return false;
never executed: return false;
0
289}-
290#endif // QT_NO_NETWORKINTERFACE-
291-
292qint64 QHttpSocketEngine::readDatagram(char *, qint64, QIpPacketHeader *, PacketHeaderOptions)-
293{-
294 qWarning("Operation is not supported");-
295 setError(QAbstractSocket::UnsupportedSocketOperationError,-
296 QLatin1String("Unsupported socket operation"));-
297 return -1;
never executed: return -1;
0
298}-
299-
300qint64 QHttpSocketEngine::writeDatagram(const char *, qint64, const QIpPacketHeader &)-
301{-
302 qWarning("Operation is not supported");-
303 setError(QAbstractSocket::UnsupportedSocketOperationError,-
304 QLatin1String("Unsupported socket operation"));-
305 return -1;
never executed: return -1;
0
306}-
307-
308bool QHttpSocketEngine::hasPendingDatagrams() const-
309{-
310 qWarning("Operation is not supported");-
311 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qhttpsocketengine - unknown status
1
312}-
313-
314qint64 QHttpSocketEngine::pendingDatagramSize() const-
315{-
316 qWarning("Operation is not supported");-
317 return -1;
never executed: return -1;
0
318}-
319#endif // QT_NO_UDPSOCKET-
320-
321qint64 QHttpSocketEngine::bytesToWrite() const-
322{-
323 Q_D(const QHttpSocketEngine);-
324 if (d->socket) {
d->socketDescription
TRUEevaluated 4305 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-4305
325 return d->socket->bytesToWrite();
executed 4305 times by 7 tests: return d->socket->bytesToWrite();
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
4305
326 } else {-
327 return 0;
never executed: return 0;
0
328 }-
329}-
330-
331int QHttpSocketEngine::option(SocketOption option) const-
332{-
333 Q_D(const QHttpSocketEngine);-
334 if (d->socket) {
d->socketDescription
TRUEnever evaluated
FALSEnever evaluated
0
335 // convert the enum and call the real socket-
336 if (option == QAbstractSocketEngine::LowDelayOption)
option == QAbs...LowDelayOptionDescription
TRUEnever evaluated
FALSEnever evaluated
0
337 return d->socket->socketOption(QAbstractSocket::LowDelayOption).toInt();
never executed: return d->socket->socketOption(QAbstractSocket::LowDelayOption).toInt();
0
338 if (option == QAbstractSocketEngine::KeepAliveOption)
option == QAbs...eepAliveOptionDescription
TRUEnever evaluated
FALSEnever evaluated
0
339 return d->socket->socketOption(QAbstractSocket::KeepAliveOption).toInt();
never executed: return d->socket->socketOption(QAbstractSocket::KeepAliveOption).toInt();
0
340 }
never executed: end of block
0
341 return -1;
never executed: return -1;
0
342}-
343-
344bool QHttpSocketEngine::setOption(SocketOption option, int value)-
345{-
346 Q_D(QHttpSocketEngine);-
347 if (d->socket) {
d->socketDescription
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-19
348 // convert the enum and call the real socket-
349 if (option == QAbstractSocketEngine::LowDelayOption)
option == QAbs...LowDelayOptionDescription
TRUEnever evaluated
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
0-19
350 d->socket->setSocketOption(QAbstractSocket::LowDelayOption, value);
never executed: d->socket->setSocketOption(QAbstractSocket::LowDelayOption, value);
0
351 if (option == QAbstractSocketEngine::KeepAliveOption)
option == QAbs...eepAliveOptionDescription
TRUEevaluated 19 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
0-19
352 d->socket->setSocketOption(QAbstractSocket::KeepAliveOption, value);
executed 19 times by 2 tests: d->socket->setSocketOption(QAbstractSocket::KeepAliveOption, value);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
19
353 return true;
executed 19 times by 2 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
19
354 }-
355 return false;
never executed: return false;
0
356}-
357-
358bool QHttpSocketEngine::waitForRead(int msecs, bool *timedOut)-
359{-
360 Q_D(const QHttpSocketEngine);-
361-
362 if (!d->socket || d->socket->state() == QAbstractSocket::UnconnectedState)
!d->socketDescription
TRUEnever evaluated
FALSEevaluated 387 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socket->sta...connectedStateDescription
TRUEnever evaluated
FALSEevaluated 387 times by 5 tests
Evaluated by:
  • 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-387
363 return false;
never executed: return false;
0
364-
365 QElapsedTimer stopWatch;-
366 stopWatch.start();-
367-
368 // Wait for more data if nothing is available.-
369 if (!d->socket->bytesAvailable()) {
!d->socket->bytesAvailable()Description
TRUEevaluated 374 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
13-374
370 if (!d->socket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))) {
!d->socket->wa...ch.elapsed()))Description
TRUEevaluated 54 times by 4 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 320 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
54-320
371 if (d->socket->state() == QAbstractSocket::UnconnectedState)
d->socket->sta...connectedStateDescription
TRUEevaluated 42 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
12-42
372 return true;
executed 42 times by 3 tests: return true;
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
42
373 setError(d->socket->error(), d->socket->errorString());-
374 if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
timedOutDescription
TRUEnever evaluated
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socket->err...etTimeoutErrorDescription
TRUEnever evaluated
FALSEnever evaluated
0-12
375 *timedOut = true;
never executed: *timedOut = true;
0
376 return false;
executed 12 times by 3 tests: return false;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
12
377 }-
378 }
executed 320 times by 5 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
320
379-
380 // If we're not connected yet, wait until we are, or until an error-
381 // occurs.-
382 while (d->state != Connected && d->socket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))) {
d->state != ConnectedDescription
TRUEnever evaluated
FALSEevaluated 333 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socket->wai...ch.elapsed()))Description
TRUEnever evaluated
FALSEnever evaluated
0-333
383 // Loop while the protocol handshake is taking place.-
384 }
never executed: end of block
0
385-
386 // Report any error that may occur.-
387 if (d->state != Connected) {
d->state != ConnectedDescription
TRUEnever evaluated
FALSEevaluated 333 times by 5 tests
Evaluated by:
  • 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-333
388 setError(d->socket->error(), d->socket->errorString());-
389 if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
timedOutDescription
TRUEnever evaluated
FALSEnever evaluated
d->socket->err...etTimeoutErrorDescription
TRUEnever evaluated
FALSEnever evaluated
0
390 *timedOut = true;
never executed: *timedOut = true;
0
391 return false;
never executed: return false;
0
392 }-
393 return true;
executed 333 times by 5 tests: return true;
Executed by:
  • 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
394}-
395-
396bool QHttpSocketEngine::waitForWrite(int msecs, bool *timedOut)-
397{-
398 Q_D(const QHttpSocketEngine);-
399-
400 // If we're connected, just forward the call.-
401 if (d->state == Connected) {
d->state == ConnectedDescription
TRUEevaluated 272 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 223 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
223-272
402 if (d->socket->bytesToWrite()) {
d->socket->bytesToWrite()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
FALSEevaluated 268 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
4-268
403 if (!d->socket->waitForBytesWritten(msecs)) {
!d->socket->wa...Written(msecs)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
0-4
404 if (d->socket->error() == QAbstractSocket::SocketTimeoutError && timedOut)
d->socket->err...etTimeoutErrorDescription
TRUEnever evaluated
FALSEnever evaluated
timedOutDescription
TRUEnever evaluated
FALSEnever evaluated
0
405 *timedOut = true;
never executed: *timedOut = true;
0
406 return false;
never executed: return false;
0
407 }-
408 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qsslsocket - unknown status
4
409 return true;
executed 272 times by 4 tests: return true;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
272
410 }-
411-
412 QElapsedTimer stopWatch;-
413 stopWatch.start();-
414-
415 // If we're not connected yet, wait until we are, and until bytes have-
416 // been received (i.e., the socket has connected, we have sent the-
417 // greeting, and then received the response).-
418 while (d->state != Connected && d->socket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))) {
d->state != ConnectedDescription
TRUEevaluated 413 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 204 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socket->wai...ch.elapsed()))Description
TRUEevaluated 394 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 19 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
19-413
419 // Loop while the protocol handshake is taking place.-
420 }
executed 394 times by 5 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
394
421-
422 // Report any error that may occur.-
423 if (d->state != Connected) {
d->state != ConnectedDescription
TRUEevaluated 19 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 204 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
19-204
424// setError(d->socket->error(), d->socket->errorString());-
425 if (timedOut && d->socket->error() == QAbstractSocket::SocketTimeoutError)
timedOutDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
d->socket->err...etTimeoutErrorDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
1-18
426 *timedOut = true;
executed 8 times by 1 test: *timedOut = true;
Executed by:
  • tst_qtcpsocket - unknown status
8
427 }
executed 19 times by 3 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
19
428-
429 return true;
executed 223 times by 5 tests: return true;
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
223
430}-
431-
432bool QHttpSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,-
433 bool checkRead, bool checkWrite,-
434 int msecs, bool *timedOut)-
435{-
436 Q_UNUSED(checkRead);-
437-
438 if (!checkWrite) {
!checkWriteDescription
TRUEevaluated 381 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 272 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
272-381
439 // Not interested in writing? Then we wait for read notifications.-
440 bool canRead = waitForRead(msecs, timedOut);-
441 if (readyToRead)
readyToReadDescription
TRUEevaluated 381 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-381
442 *readyToRead = canRead;
executed 381 times by 4 tests: *readyToRead = canRead;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
381
443 return canRead;
executed 381 times by 4 tests: return canRead;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
381
444 }-
445-
446 // Interested in writing? Then we wait for write notifications.-
447 bool canWrite = waitForWrite(msecs, timedOut);-
448 if (readyToWrite)
readyToWriteDescription
TRUEevaluated 272 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-272
449 *readyToWrite = canWrite;
executed 272 times by 4 tests: *readyToWrite = canWrite;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
272
450 return canWrite;
executed 272 times by 4 tests: return canWrite;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
272
451}-
452-
453bool QHttpSocketEngine::isReadNotificationEnabled() const-
454{-
455 Q_D(const QHttpSocketEngine);-
456 return d->readNotificationEnabled;
executed 6203 times by 7 tests: return d->readNotificationEnabled;
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
6203
457}-
458-
459void QHttpSocketEngine::setReadNotificationEnabled(bool enable)-
460{-
461 Q_D(QHttpSocketEngine);-
462 if (d->readNotificationEnabled == enable)
d->readNotific...bled == enableDescription
TRUEevaluated 3784 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 605 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
605-3784
463 return;
executed 3784 times by 7 tests: return;
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
3784
464-
465 d->readNotificationEnabled = enable;-
466 if (enable) {
enableDescription
TRUEevaluated 338 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 267 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
267-338
467 // Enabling read notification can trigger a notification.-
468 if (bytesAvailable()) {
bytesAvailable()Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEevaluated 308 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
30-308
469 slotSocketReadNotification();-
470 } else if (d->socket && d->socket->state() == QAbstractSocket::UnconnectedState) {
executed 30 times by 1 test: end of block
Executed by:
  • tst_qtcpsocket - unknown status
d->socketDescription
TRUEevaluated 308 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
d->socket->sta...connectedStateDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 307 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-308
471 emitReadNotification();-
472 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
1
473 }
executed 338 times by 7 tests: end of block
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
338
474}
executed 605 times by 7 tests: end of block
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
605
475-
476bool QHttpSocketEngine::isWriteNotificationEnabled() const-
477{-
478 Q_D(const QHttpSocketEngine);-
479 return d->writeNotificationEnabled;
executed 1071 times by 7 tests: return d->writeNotificationEnabled;
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
1071
480}-
481-
482void QHttpSocketEngine::setWriteNotificationEnabled(bool enable)-
483{-
484 Q_D(QHttpSocketEngine);-
485 d->writeNotificationEnabled = enable;-
486 if (enable && d->state == Connected && d->socket->state() == QAbstractSocket::ConnectedState)
enableDescription
TRUEevaluated 1446 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 222 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
d->state == ConnectedDescription
TRUEevaluated 1332 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 114 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
d->socket->sta...ConnectedStateDescription
TRUEevaluated 1332 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-1446
487 QMetaObject::invokeMethod(this, "writeNotification", Qt::QueuedConnection);
executed 1332 times by 7 tests: QMetaObject::invokeMethod(this, "writeNotification", Qt::QueuedConnection);
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
1332
488}
executed 1668 times by 7 tests: end of block
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
1668
489-
490bool QHttpSocketEngine::isExceptionNotificationEnabled() const-
491{-
492 Q_D(const QHttpSocketEngine);-
493 return d->exceptNotificationEnabled;
executed 39 times by 3 tests: return d->exceptNotificationEnabled;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
39
494}-
495-
496void QHttpSocketEngine::setExceptionNotificationEnabled(bool enable)-
497{-
498 Q_D(QHttpSocketEngine);-
499 d->exceptNotificationEnabled = enable;-
500}
executed 78 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
78
501-
502void QHttpSocketEngine::slotSocketConnected()-
503{-
504 Q_D(QHttpSocketEngine);-
505-
506 // Send the greeting.-
507 const char method[] = "CONNECT";-
508 QByteArray peerAddress = d->peerName.isEmpty() ?
d->peerName.isEmpty()Description
TRUEevaluated 49 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 482 times by 6 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
49-482
509 d->peerAddress.toString().toLatin1() :-
510 QUrl::toAce(d->peerName);-
511 QByteArray path = peerAddress + ':' + QByteArray::number(d->peerPort);-
512 QByteArray data = method;-
513 data += ' ';-
514 data += path;-
515 data += " HTTP/1.1\r\n";-
516 data += "Proxy-Connection: keep-alive\r\n";-
517 data += "Host: " + peerAddress + "\r\n";-
518 if (!d->proxy.hasRawHeader("User-Agent"))
!d->proxy.hasR...("User-Agent")Description
TRUEevaluated 518 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QNetworkReply
13-518
519 data += "User-Agent: Mozilla/5.0\r\n";
executed 518 times by 7 tests: data += "User-Agent: Mozilla/5.0\r\n";
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
518
520 const auto headers = d->proxy.rawHeaderList();-
521 for (const QByteArray &header : headers)-
522 data += header + ": " + d->proxy.rawHeader(header) + "\r\n";
executed 13 times by 1 test: data += header + ": " + d->proxy.rawHeader(header) + "\r\n";
Executed by:
  • tst_QNetworkReply
13
523 QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator);-
524 //qDebug() << "slotSocketConnected: priv=" << priv << (priv ? (int)priv->method : -1);-
525 if (priv && priv->method != QAuthenticatorPrivate::None) {
privDescription
TRUEevaluated 174 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 357 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
priv->method !...rPrivate::NoneDescription
TRUEevaluated 168 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
6-357
526 d->credentialsSent = true;-
527 data += "Proxy-Authorization: " + priv->calculateResponse(method, path);-
528 data += "\r\n";-
529 }
executed 168 times by 7 tests: end of block
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
168
530 data += "\r\n";-
531// qDebug() << ">>>>>>>> sending request" << this;-
532// qDebug() << data;-
533// qDebug(">>>>>>>");-
534 d->socket->write(data);-
535 d->state = ConnectSent;-
536}
executed 531 times by 7 tests: end of block
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
531
537-
538void QHttpSocketEngine::slotSocketDisconnected()-
539{-
540}-
541-
542void QHttpSocketEngine::slotSocketReadNotification()-
543{-
544 Q_D(QHttpSocketEngine);-
545 if (d->state != Connected && d->socket->bytesAvailable() == 0)
d->state != ConnectedDescription
TRUEevaluated 628 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 3183 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socket->byt...ailable() == 0Description
TRUEnever evaluated
FALSEevaluated 628 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-3183
546 return;
never executed: return;
0
547-
548 if (d->state == Connected) {
d->state == ConnectedDescription
TRUEevaluated 3183 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 628 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
628-3183
549 // Forward as a read notification.-
550 if (d->readNotificationEnabled)
d->readNotificationEnabledDescription
TRUEevaluated 3155 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
28-3155
551 emitReadNotification();
executed 3155 times by 7 tests: emitReadNotification();
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
3155
552 return;
executed 3183 times by 7 tests: return;
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
3183
553 }-
554-
555 if (d->state == ConnectSent) {
d->state == ConnectSentDescription
TRUEevaluated 512 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 116 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
116-512
556 d->reply->d_func()->state = QHttpNetworkReplyPrivate::NothingDoneState;-
557 d->state = ReadResponseHeader;-
558 }
executed 512 times by 7 tests: end of block
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
512
559-
560 if (d->state == ReadResponseHeader) {
d->state == ReadResponseHeaderDescription
TRUEevaluated 512 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 116 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
116-512
561 bool ok = readHttpHeader();-
562 if (!ok) {
!okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2-510
563 // protocol error, this isn't HTTP-
564 d->socket->close();-
565 setState(QAbstractSocket::UnconnectedState);-
566 setError(QAbstractSocket::ProxyProtocolError, tr("Did not receive HTTP response from proxy"));-
567 emitConnectionNotification();-
568 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qhttpsocketengine - unknown status
2
569 }-
570 if (d->state == ReadResponseHeader)
d->state == ReadResponseHeaderDescription
TRUEnever evaluated
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-510
571 return; // readHttpHeader() was not done yet, need to wait for more header data
never executed: return;
0
572 }
executed 510 times by 7 tests: end of block
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
510
573-
574 if (d->state == ReadResponseContent) {
d->state == Re...esponseContentDescription
TRUEevaluated 626 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-626
575 char dummybuffer[4096];-
576 while (d->pendingResponseData) {
d->pendingResponseDataDescription
TRUEevaluated 413 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
413-510
577 int read = d->socket->read(dummybuffer, qMin(sizeof(dummybuffer), (size_t)d->pendingResponseData));-
578 if (read == 0)
read == 0Description
TRUEevaluated 116 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 297 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
116-297
579 return;
executed 116 times by 7 tests: return;
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
116
580 if (read == -1) {
read == -1Description
TRUEnever evaluated
FALSEevaluated 297 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-297
581 d->socket->disconnectFromHost();-
582 emitWriteNotification();-
583 return;
never executed: return;
0
584 }-
585 d->pendingResponseData -= read;-
586 }
executed 297 times by 7 tests: end of block
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
297
587 if (d->pendingResponseData > 0)
d->pendingResponseData > 0Description
TRUEnever evaluated
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-510
588 return;
never executed: return;
0
589 if (d->reply->d_func()->statusCode == 407)
d->reply->d_fu...tusCode == 407Description
TRUEevaluated 176 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 334 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
176-334
590 d->state = SendAuthentication;
executed 176 times by 7 tests: d->state = SendAuthentication;
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
176
591 }
executed 510 times by 7 tests: end of block
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
510
592-
593 int statusCode = d->reply->statusCode();-
594 QAuthenticatorPrivate *priv = 0;-
595 if (statusCode == 200) {
statusCode == 200Description
TRUEevaluated 312 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 198 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
198-312
596 d->state = Connected;-
597 setLocalAddress(d->socket->localAddress());-
598 setLocalPort(d->socket->localPort());-
599 d->inboundStreamCount = d->outboundStreamCount = 1;-
600 setState(QAbstractSocket::ConnectedState);-
601 d->authenticator.detach();-
602 priv = QAuthenticatorPrivate::getPrivate(d->authenticator);-
603 priv->hasFailed = false;-
604 } else if (statusCode == 407) {
executed 312 times by 7 tests: end of block
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
statusCode == 407Description
TRUEevaluated 176 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
22-312
605 if (d->authenticator.isNull())
d->authenticator.isNull()Description
TRUEevaluated 166 times by 6 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
10-166
606 d->authenticator.detach();
executed 166 times by 6 tests: d->authenticator.detach();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
166
607 priv = QAuthenticatorPrivate::getPrivate(d->authenticator);-
608-
609 if (d->credentialsSent && priv->phase != QAuthenticatorPrivate::Phase2) {
d->credentialsSentDescription
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 171 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
priv->phase !=...rivate::Phase2Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
FALSEnever evaluated
0-171
610 // Remember that (e.g.) NTLM is two-phase, so only reset when the authentication is not currently in progress.-
611 //407 response again means the provided username/password were invalid.-
612 d->authenticator = QAuthenticator(); //this is needed otherwise parseHttpResponse won't set the state, and then signal isn't emitted.-
613 d->authenticator.detach();-
614 priv = QAuthenticatorPrivate::getPrivate(d->authenticator);-
615 priv->hasFailed = true;-
616 }
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
5
617-
618 priv->parseHttpResponse(d->reply->header(), true);-
619-
620 if (priv->phase == QAuthenticatorPrivate::Invalid) {
priv->phase ==...ivate::InvalidDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 174 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2-174
621 // problem parsing the reply-
622 d->socket->close();-
623 setState(QAbstractSocket::UnconnectedState);-
624 setError(QAbstractSocket::ProxyProtocolError, tr("Error parsing authentication request from proxy"));-
625 emitConnectionNotification();-
626 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qhttpsocketengine - unknown status
2
627 }-
628-
629 bool willClose;-
630 QByteArray proxyConnectionHeader = d->reply->headerField("Proxy-Connection");-
631 // Although most proxies use the unofficial Proxy-Connection header, the Connection header-
632 // from http spec is also allowed.-
633 if (proxyConnectionHeader.isEmpty())
proxyConnectio...ader.isEmpty()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 171 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
3-171
634 proxyConnectionHeader = d->reply->headerField("Connection");
executed 3 times by 1 test: proxyConnectionHeader = d->reply->headerField("Connection");
Executed by:
  • tst_qhttpsocketengine - unknown status
3
635 proxyConnectionHeader = proxyConnectionHeader.toLower();-
636 if (proxyConnectionHeader == "close") {
proxyConnectio...der == "close"Description
TRUEevaluated 170 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
4-170
637 willClose = true;-
638 } else if (proxyConnectionHeader == "keep-alive") {
executed 170 times by 7 tests: end of block
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
proxyConnectio...= "keep-alive"Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
1-170
639 willClose = false;-
640 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
1
641 // no Proxy-Connection header, so use the default-
642 // HTTP 1.1's default behaviour is to keep persistent connections-
643 // HTTP 1.0 or earlier, so we expect the server to close-
644 willClose = (d->reply->majorVersion() * 0x100 + d->reply->minorVersion()) <= 0x0100;-
645 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
3
646-
647 if (willClose) {
willCloseDescription
TRUEevaluated 173 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
1-173
648 // the server will disconnect, so let's avoid receiving an error-
649 // especially since the signal below may trigger a new event loop-
650 d->socket->disconnectFromHost();-
651 d->socket->readAll();-
652 //We're done with the reply and need to reset it for the next connection-
653 delete d->reply;-
654 d->reply = new QHttpNetworkReply;-
655 }
executed 173 times by 7 tests: end of block
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
173
656-
657 if (priv->phase == QAuthenticatorPrivate::Done)
priv->phase ==...rPrivate::DoneDescription
TRUEevaluated 171 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
3-171
658 emit proxyAuthenticationRequired(d->proxy, &d->authenticator);
executed 171 times by 7 tests: proxyAuthenticationRequired(d->proxy, &d->authenticator);
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
171
659 // priv->phase will get reset to QAuthenticatorPrivate::Start if the authenticator got modified in the signal above.-
660 if (priv->phase == QAuthenticatorPrivate::Done) {
priv->phase ==...rPrivate::DoneDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 168 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
6-168
661 setError(QAbstractSocket::ProxyAuthenticationRequiredError, tr("Authentication required"));-
662 d->socket->disconnectFromHost();-
663 } else {
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
6
664 // close the connection if it isn't already and reconnect using the chosen authentication method-
665 d->state = SendAuthentication;-
666 if (willClose) {
willCloseDescription
TRUEevaluated 167 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
1-167
667 d->socket->connectToHost(d->proxy.hostName(), d->proxy.port());-
668 } else {
executed 167 times by 7 tests: end of block
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
167
669 // send the HTTP CONNECT again-
670 slotSocketConnected();-
671 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
1
672 return;
executed 168 times by 7 tests: return;
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
168
673 }-
674 } else {-
675 d->socket->close();-
676 setState(QAbstractSocket::UnconnectedState);-
677 if (statusCode == 403 || statusCode == 405) {
statusCode == 403Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 19 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
statusCode == 405Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 17 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
2-19
678 // 403 Forbidden-
679 // 405 Method Not Allowed-
680 setError(QAbstractSocket::SocketAccessError, tr("Proxy denied connection"));-
681 } else if (statusCode == 404) {
executed 5 times by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
statusCode == 404Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
5-10
682 // 404 Not Found: host lookup error-
683 setError(QAbstractSocket::HostNotFoundError, QAbstractSocket::tr("Host not found"));-
684 } else if (statusCode == 503) {
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
statusCode == 503Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
1-10
685 // 503 Service Unavailable: Connection Refused-
686 setError(QAbstractSocket::ConnectionRefusedError, QAbstractSocket::tr("Connection refused"));-
687 } else {
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
6
688 // Some other reply-
689 //qWarning("UNEXPECTED RESPONSE: [%s]", responseHeader.toString().toLatin1().data());-
690 setError(QAbstractSocket::ProxyProtocolError, tr("Error communicating with HTTP proxy"));-
691 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qhttpsocketengine - unknown status
1
692 }-
693-
694 // The handshake is done; notify that we're connected (or failed to connect)-
695 emitConnectionNotification();-
696}
executed 340 times by 7 tests: end of block
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
340
697-
698bool QHttpSocketEngine::readHttpHeader()-
699{-
700 Q_D(QHttpSocketEngine);-
701-
702 if (d->state != ReadResponseHeader)
d->state != ReadResponseHeaderDescription
TRUEnever evaluated
FALSEevaluated 512 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-512
703 return false;
never executed: return false;
0
704-
705 bool ok = true;-
706 if (d->reply->d_func()->state == QHttpNetworkReplyPrivate::NothingDoneState) {
d->reply->d_fu...thingDoneStateDescription
TRUEevaluated 512 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-512
707 // do not keep old content sizes, status etc. around-
708 d->reply->d_func()->clearHttpLayerInformation();-
709 d->reply->d_func()->state = QHttpNetworkReplyPrivate::ReadingStatusState;-
710 }
executed 512 times by 7 tests: end of block
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
512
711 if (d->reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingStatusState) {
d->reply->d_fu...ingStatusStateDescription
TRUEevaluated 512 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-512
712 ok = d->reply->d_func()->readStatus(d->socket) != -1;-
713 if (ok && d->reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingStatusState)
okDescription
TRUEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
d->reply->d_fu...ingStatusStateDescription
TRUEnever evaluated
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-510
714 return true; //Not done parsing headers yet, wait for more data
never executed: return true;
0
715 }
executed 512 times by 7 tests: end of block
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
512
716 if (ok && d->reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingHeaderState) {
okDescription
TRUEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
d->reply->d_fu...ingHeaderStateDescription
TRUEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-510
717 ok = d->reply->d_func()->readHeader(d->socket) != -1;-
718 if (ok && d->reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingHeaderState)
okDescription
TRUEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
d->reply->d_fu...ingHeaderStateDescription
TRUEnever evaluated
FALSEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-510
719 return true; //Not done parsing headers yet, wait for more data
never executed: return true;
0
720 }
executed 510 times by 7 tests: end of block
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
510
721 if (ok) {
okDescription
TRUEevaluated 510 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
2-510
722 bool contentLengthOk;-
723 int contentLength = d->reply->headerField("Content-Length").toInt(&contentLengthOk);-
724 if (contentLengthOk && contentLength > 0)
contentLengthOkDescription
TRUEevaluated 181 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 329 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
contentLength > 0Description
TRUEevaluated 181 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-329
725 d->pendingResponseData = contentLength;
executed 181 times by 7 tests: d->pendingResponseData = contentLength;
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
181
726 d->state = ReadResponseContent; // we are done reading the header-
727 }
executed 510 times by 7 tests: end of block
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
510
728 return ok;
executed 512 times by 7 tests: return ok;
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
512
729}-
730-
731void QHttpSocketEngine::slotSocketBytesWritten()-
732{-
733 Q_D(QHttpSocketEngine);-
734 if (d->state == Connected && d->writeNotificationEnabled)
d->state == ConnectedDescription
TRUEevaluated 392 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 531 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->writeNotificationEnabledDescription
TRUEevaluated 390 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qhttpsocketengine - unknown status
2-531
735 emitWriteNotification();
executed 390 times by 7 tests: emitWriteNotification();
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
390
736}
executed 923 times by 7 tests: end of block
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
923
737-
738void QHttpSocketEngine::slotSocketError(QAbstractSocket::SocketError error)-
739{-
740 Q_D(QHttpSocketEngine);-
741-
742 if (d->state != Connected) {
d->state != ConnectedDescription
TRUEevaluated 18 times by 4 tests
Evaluated by:
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 119 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
18-119
743 // we are in proxy handshaking stages-
744 if (error == QAbstractSocket::HostNotFoundError)
error == QAbst...tNotFoundErrorDescription
TRUEevaluated 5 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
5-13
745 setError(QAbstractSocket::ProxyNotFoundError, tr("Proxy server not found"));
executed 5 times by 3 tests: setError(QAbstractSocket::ProxyNotFoundError, tr("Proxy server not found"));
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
5
746 else if (error == QAbstractSocket::ConnectionRefusedError)
error == QAbst...onRefusedErrorDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
2-11
747 setError(QAbstractSocket::ProxyConnectionRefusedError, tr("Proxy connection refused"));
executed 2 times by 2 tests: setError(QAbstractSocket::ProxyConnectionRefusedError, tr("Proxy connection refused"));
Executed by:
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
2
748 else if (error == QAbstractSocket::SocketTimeoutError)
error == QAbst...etTimeoutErrorDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
3-8
749 setError(QAbstractSocket::ProxyConnectionTimeoutError, tr("Proxy server connection timed out"));
executed 8 times by 1 test: setError(QAbstractSocket::ProxyConnectionTimeoutError, tr("Proxy server connection timed out"));
Executed by:
  • tst_qtcpsocket - unknown status
8
750 else if (error == QAbstractSocket::RemoteHostClosedError)
error == QAbst...ostClosedErrorDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-3
751 setError(QAbstractSocket::ProxyConnectionClosedError, tr("Proxy connection closed prematurely"));
executed 3 times by 2 tests: setError(QAbstractSocket::ProxyConnectionClosedError, tr("Proxy connection closed prematurely"));
Executed by:
  • tst_qhttpsocketengine - unknown status
  • tst_qtcpsocket - unknown status
3
752 else-
753 setError(error, d->socket->errorString());
never executed: setError(error, d->socket->errorString());
0
754 emitConnectionNotification();-
755 return;
executed 18 times by 4 tests: return;
Executed by:
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
18
756 }-
757-
758 // We're connected-
759 if (error == QAbstractSocket::SocketTimeoutError)
error == QAbst...etTimeoutErrorDescription
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 107 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
12-107
760 return; // ignore this error
executed 12 times by 3 tests: return;
Executed by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
12
761-
762 d->state = None;-
763 setError(error, d->socket->errorString());-
764 if (error != QAbstractSocket::RemoteHostClosedError)
error != QAbst...ostClosedErrorDescription
TRUEnever evaluated
FALSEevaluated 107 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
0-107
765 qDebug() << "QHttpSocketEngine::slotSocketError: got weird error =" << error;
never executed: QMessageLogger(__FILE__, 765, __PRETTY_FUNCTION__).debug() << "QHttpSocketEngine::slotSocketError: got weird error =" << error;
0
766 //read notification needs to always be emitted, otherwise the higher layer doesn't get the disconnected signal-
767 emitReadNotification();-
768}
executed 107 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
107
769-
770void QHttpSocketEngine::slotSocketStateChanged(QAbstractSocket::SocketState state)-
771{-
772 Q_UNUSED(state);-
773}
executed 2677 times by 7 tests: end of block
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
2677
774-
775void QHttpSocketEngine::emitPendingReadNotification()-
776{-
777 Q_D(QHttpSocketEngine);-
778 d->readNotificationPending = false;-
779 if (d->readNotificationEnabled)
d->readNotificationEnabledDescription
TRUEevaluated 2894 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qtcpsocket - unknown status
1-2894
780 emit readNotification();
executed 2894 times by 5 tests: readNotification();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2894
781}
executed 2895 times by 5 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2895
782-
783void QHttpSocketEngine::emitPendingWriteNotification()-
784{-
785 Q_D(QHttpSocketEngine);-
786 d->writeNotificationPending = false;-
787 if (d->writeNotificationEnabled)
d->writeNotificationEnabledDescription
TRUEevaluated 126 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
2-126
788 emit writeNotification();
executed 126 times by 5 tests: writeNotification();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
126
789}
executed 128 times by 5 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
128
790-
791void QHttpSocketEngine::emitPendingConnectionNotification()-
792{-
793 Q_D(QHttpSocketEngine);-
794 d->connectionNotificationPending = false;-
795 emit connectionNotification();-
796}
executed 146 times by 5 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
146
797-
798void QHttpSocketEngine::emitReadNotification()-
799{-
800 Q_D(QHttpSocketEngine);-
801 // if there is a connection notification pending we have to emit the readNotification-
802 // incase there is connection error. This is only needed for Windows, but it does not-
803 // hurt in other cases.-
804 if ((d->readNotificationEnabled && !d->readNotificationPending) || d->connectionNotificationPending) {
d->readNotificationEnabledDescription
TRUEevaluated 3309 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 45 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
!d->readNotificationPendingDescription
TRUEevaluated 3127 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 182 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->connectionN...icationPendingDescription
TRUEevaluated 214 times by 5 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
13-3309
805 d->readNotificationPending = true;-
806 QMetaObject::invokeMethod(this, "emitPendingReadNotification", Qt::QueuedConnection);-
807 }
executed 3341 times by 7 tests: end of block
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
3341
808}
executed 3354 times by 7 tests: end of block
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
3354
809-
810void QHttpSocketEngine::emitWriteNotification()-
811{-
812 Q_D(QHttpSocketEngine);-
813 if (d->writeNotificationEnabled && !d->writeNotificationPending) {
d->writeNotificationEnabledDescription
TRUEevaluated 390 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
!d->writeNotificationPendingDescription
TRUEevaluated 264 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 126 times by 4 tests
Evaluated by:
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-390
814 d->writeNotificationPending = true;-
815 QMetaObject::invokeMethod(this, "emitPendingWriteNotification", Qt::QueuedConnection);-
816 }
executed 264 times by 7 tests: end of block
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
264
817}
executed 390 times by 7 tests: end of block
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
390
818-
819void QHttpSocketEngine::emitConnectionNotification()-
820{-
821 Q_D(QHttpSocketEngine);-
822 if (!d->connectionNotificationPending) {
!d->connection...icationPendingDescription
TRUEevaluated 362 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-362
823 d->connectionNotificationPending = true;-
824 QMetaObject::invokeMethod(this, "emitPendingConnectionNotification", Qt::QueuedConnection);-
825 }
executed 362 times by 7 tests: end of block
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
362
826}
executed 362 times by 7 tests: end of block
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
362
827-
828QHttpSocketEnginePrivate::QHttpSocketEnginePrivate()-
829 : readNotificationEnabled(false)-
830 , writeNotificationEnabled(false)-
831 , exceptNotificationEnabled(false)-
832 , readNotificationPending(false)-
833 , writeNotificationPending(false)-
834 , connectionNotificationPending(false)-
835 , credentialsSent(false)-
836 , pendingResponseData(0)-
837{-
838 socket = 0;-
839 reply = 0;-
840 state = QHttpSocketEngine::None;-
841}
executed 375 times by 7 tests: end of block
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
375
842-
843QHttpSocketEnginePrivate::~QHttpSocketEnginePrivate()-
844{-
845}-
846-
847QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(QAbstractSocket::SocketType socketType,-
848 const QNetworkProxy &proxy,-
849 QObject *parent)-
850{-
851 if (socketType != QAbstractSocket::TcpSocket)
socketType != ...ket::TcpSocketDescription
TRUEevaluated 133 times by 3 tests
Evaluated by:
  • tst_QUdpSocket
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 5692 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
133-5692
852 return 0;
executed 133 times by 3 tests: return 0;
Executed by:
  • tst_QUdpSocket
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
133
853-
854 // proxy type must have been resolved by now-
855 if (proxy.type() != QNetworkProxy::HttpProxy)
proxy.type() !...oxy::HttpProxyDescription
TRUEevaluated 5321 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 371 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
371-5321
856 return 0;
executed 5321 times by 28 tests: return 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
5321
857-
858 // we only accept active sockets-
859 if (!qobject_cast<QAbstractSocket *>(parent))
!qobject_cast<...ket *>(parent)Description
TRUEnever evaluated
FALSEevaluated 371 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qhttpsocketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0-371
860 return 0;
never executed: return 0;
0
861-
862 QHttpSocketEngine *engine = new QHttpSocketEngine(parent);-
863 engine->setProxy(proxy);-
864 return engine;
executed 371 times by 7 tests: return engine;
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
371
865}-
866-
867QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(qintptr, QObject *)-
868{-
869 return 0;
executed 999 times by 18 tests: return 0;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
999
870}-
871-
872QT_END_NAMESPACE-
873-
874#endif-
Source codeSwitch to Preprocessed file

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