Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #include "qhttpnetworkheader_p.h" | - |
41 | | - |
42 | #include <algorithm> | - |
43 | | - |
44 | #ifndef QT_NO_HTTP | - |
45 | | - |
46 | QT_BEGIN_NAMESPACE | - |
47 | | - |
48 | QHttpNetworkHeaderPrivate::QHttpNetworkHeaderPrivate(const QUrl &newUrl) | - |
49 | :url(newUrl) | - |
50 | { | - |
51 | }executed 11858 times by 14 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 11858 |
52 | | - |
53 | QHttpNetworkHeaderPrivate::QHttpNetworkHeaderPrivate(const QHttpNetworkHeaderPrivate &other) | - |
54 | :QSharedData(other) | - |
55 | { | - |
56 | url = other.url; | - |
57 | fields = other.fields; | - |
58 | }executed 2184 times by 8 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
| 2184 |
59 | | - |
60 | qint64 QHttpNetworkHeaderPrivate::contentLength() const | - |
61 | { | - |
62 | bool ok = false; | - |
63 | | - |
64 | | - |
65 | QByteArray value; | - |
66 | QList<QPair<QByteArray, QByteArray> >::ConstIterator it = fields.constBegin(), | - |
67 | end = fields.constEnd(); | - |
68 | for ( ; it != end; ++it)TRUE | evaluated 28959 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 963 times by 9 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- 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
|
| 963-28959 |
69 | if (qstricmp("content-length", it->first) == 0) {TRUE | evaluated 6891 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 22068 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
| 6891-22068 |
70 | value = it->second; | - |
71 | break;executed 6891 times by 14 tests: break; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 6891 |
72 | } | - |
73 | | - |
74 | qint64 length = value.toULongLong(&ok); | - |
75 | if (ok)TRUE | evaluated 6891 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 963 times by 9 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- 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
|
| 963-6891 |
76 | return length;executed 6891 times by 14 tests: return length; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 6891 |
77 | return -1; executed 963 times by 9 tests: return -1; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- 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
| 963 |
78 | } | - |
79 | | - |
80 | void QHttpNetworkHeaderPrivate::setContentLength(qint64 length) | - |
81 | { | - |
82 | setHeaderField("Content-Length", QByteArray::number(length)); | - |
83 | }executed 222 times by 4 tests: end of block Executed by:- tst_QHttpNetworkConnection
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
| 222 |
84 | | - |
85 | QByteArray QHttpNetworkHeaderPrivate::headerField(const QByteArray &name, const QByteArray &defaultValue) const | - |
86 | { | - |
87 | QList<QByteArray> allValues = headerFieldValues(name); | - |
88 | if (allValues.isEmpty())TRUE | evaluated 17321 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 3964 times by 13 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
| 3964-17321 |
89 | return defaultValue;executed 17321 times by 14 tests: return defaultValue; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 17321 |
90 | else | - |
91 | return allValues.join(", ");executed 3964 times by 13 tests: return allValues.join(", "); Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 3964 |
92 | } | - |
93 | | - |
94 | QList<QByteArray> QHttpNetworkHeaderPrivate::headerFieldValues(const QByteArray &name) const | - |
95 | { | - |
96 | QList<QByteArray> result; | - |
97 | QList<QPair<QByteArray, QByteArray> >::ConstIterator it = fields.constBegin(), | - |
98 | end = fields.constEnd(); | - |
99 | for ( ; it != end; ++it)TRUE | evaluated 111070 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 21641 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
| 21641-111070 |
100 | if (qstricmp(name.constData(), it->first) == 0)TRUE | evaluated 4321 times by 13 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| FALSE | evaluated 106749 times by 14 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
|
| 4321-106749 |
101 | result += it->second;executed 4321 times by 13 tests: result += it->second; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 4321 |
102 | | - |
103 | return result;executed 21641 times by 14 tests: return result; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
- tst_qhttpnetworkreply - unknown status
- tst_qhttpsocketengine - unknown status
- tst_qsslsocket - unknown status
- tst_qsslsocket_onDemandCertificates_member - unknown status
- tst_qsslsocket_onDemandCertificates_static - unknown status
- tst_qtcpsocket - unknown status
| 21641 |
104 | } | - |
105 | | - |
106 | void QHttpNetworkHeaderPrivate::setHeaderField(const QByteArray &name, const QByteArray &data) | - |
107 | { | - |
108 | auto firstEqualsName = [&name](const QPair<QByteArray, QByteArray> &header) { | - |
109 | return qstricmp(name.constData(), header.first) == 0;executed 20896 times by 8 tests: return qstricmp(name.constData(), header.first) == 0; Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
| 20896 |
110 | }; | - |
111 | fields.erase(std::remove_if(fields.begin(), fields.end(), | - |
112 | firstEqualsName), | - |
113 | fields.end()); | - |
114 | fields.append(qMakePair(name, data)); | - |
115 | }executed 9410 times by 8 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QHttpNetworkConnection
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QXmlInputSource
- tst_Spdy
| 9410 |
116 | | - |
117 | bool QHttpNetworkHeaderPrivate::operator==(const QHttpNetworkHeaderPrivate &other) const | - |
118 | { | - |
119 | return (url == other.url); never executed: return (url == other.url); | 0 |
120 | } | - |
121 | | - |
122 | | - |
123 | QT_END_NAMESPACE | - |
124 | | - |
125 | #endif | - |
| | |