| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/network/access/qhttpnetworkrequest.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op, | - | ||||||||||||||||||||||||
| 7 | QHttpNetworkRequest::Priority pri, const QUrl &newUrl) | - | ||||||||||||||||||||||||
| 8 | : QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(0), | - | ||||||||||||||||||||||||
| 9 | autoDecompress(false), pipeliningAllowed(false), spdyAllowed(false), | - | ||||||||||||||||||||||||
| 10 | withCredentials(true), preConnect(false), followRedirect(false), redirectCount(0) | - | ||||||||||||||||||||||||
| 11 | { | - | ||||||||||||||||||||||||
| 12 | } executed 9653 times by 14 tests: end of blockExecuted by:
| 9653 | ||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||
| 14 | QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequestPrivate &other) | - | ||||||||||||||||||||||||
| 15 | : QHttpNetworkHeaderPrivate(other), | - | ||||||||||||||||||||||||
| 16 | operation(other.operation), | - | ||||||||||||||||||||||||
| 17 | customVerb(other.customVerb), | - | ||||||||||||||||||||||||
| 18 | priority(other.priority), | - | ||||||||||||||||||||||||
| 19 | uploadByteDevice(other.uploadByteDevice), | - | ||||||||||||||||||||||||
| 20 | autoDecompress(other.autoDecompress), | - | ||||||||||||||||||||||||
| 21 | pipeliningAllowed(other.pipeliningAllowed), | - | ||||||||||||||||||||||||
| 22 | spdyAllowed(other.spdyAllowed), | - | ||||||||||||||||||||||||
| 23 | withCredentials(other.withCredentials), | - | ||||||||||||||||||||||||
| 24 | ssl(other.ssl), | - | ||||||||||||||||||||||||
| 25 | preConnect(other.preConnect), | - | ||||||||||||||||||||||||
| 26 | followRedirect(other.followRedirect), | - | ||||||||||||||||||||||||
| 27 | redirectCount(other.redirectCount) | - | ||||||||||||||||||||||||
| 28 | { | - | ||||||||||||||||||||||||
| 29 | } executed 2184 times by 8 tests: end of blockExecuted by:
| 2184 | ||||||||||||||||||||||||
| 30 | - | |||||||||||||||||||||||||
| 31 | QHttpNetworkRequestPrivate::~QHttpNetworkRequestPrivate() | - | ||||||||||||||||||||||||
| 32 | { | - | ||||||||||||||||||||||||
| 33 | } | - | ||||||||||||||||||||||||
| 34 | - | |||||||||||||||||||||||||
| 35 | bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &other) const | - | ||||||||||||||||||||||||
| 36 | { | - | ||||||||||||||||||||||||
| 37 | return never executed: QHttpNetworkHeaderPrivate::operator==(other)return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect);never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 38 | && (operation == other.operation) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 39 | && (priority == other.priority) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 40 | && (uploadByteDevice == other.uploadByteDevice) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 41 | && (autoDecompress == other.autoDecompress) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 42 | && (pipeliningAllowed == other.pipeliningAllowed) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 43 | && (spdyAllowed == other.spdyAllowed) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 44 | 0 | |||||||||||||||||||||||||
| 45 | && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 46 | && (withCredentials == other.withCredentials) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 47 | && (ssl == other.ssl) never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 48 | && (preConnect == other.preConnect); never executed: return QHttpNetworkHeaderPrivate::operator==(other) && (operation == other.operation) && (priority == other.priority) && (uploadByteDevice == other.uploadByteDevice) && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) && (ssl == other.ssl) && (preConnect == other.preConnect); | 0 | ||||||||||||||||||||||||
| 49 | } | - | ||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||
| 51 | QByteArray QHttpNetworkRequest::methodName() const | - | ||||||||||||||||||||||||
| 52 | { | - | ||||||||||||||||||||||||
| 53 | switch (d->operation) { | - | ||||||||||||||||||||||||
| 54 | case executed 1603 times by 7 tests: QHttpNetworkRequest::Get:case QHttpNetworkRequest::Get:Executed by:
executed 1603 times by 7 tests: case QHttpNetworkRequest::Get:Executed by:
| 1603 | ||||||||||||||||||||||||
| 55 | return executed 1603 times by 7 tests: "GET";return "GET";Executed by:
executed 1603 times by 7 tests: return "GET";Executed by:
| 1603 | ||||||||||||||||||||||||
| 56 | case executed 118 times by 2 tests: QHttpNetworkRequest::Head:case QHttpNetworkRequest::Head:Executed by:
executed 118 times by 2 tests: case QHttpNetworkRequest::Head:Executed by:
| 118 | ||||||||||||||||||||||||
| 57 | return executed 118 times by 2 tests: "HEAD";return "HEAD";Executed by:
executed 118 times by 2 tests: return "HEAD";Executed by:
| 118 | ||||||||||||||||||||||||
| 58 | case executed 248 times by 4 tests: QHttpNetworkRequest::Post:case QHttpNetworkRequest::Post:Executed by:
executed 248 times by 4 tests: case QHttpNetworkRequest::Post:Executed by:
| 248 | ||||||||||||||||||||||||
| 59 | return executed 248 times by 4 tests: "POST";return "POST";Executed by:
executed 248 times by 4 tests: return "POST";Executed by:
| 248 | ||||||||||||||||||||||||
| 60 | case never executed: QHttpNetworkRequest::Options:case QHttpNetworkRequest::Options:never executed: case QHttpNetworkRequest::Options: | 0 | ||||||||||||||||||||||||
| 61 | return never executed: "OPTIONS";return "OPTIONS";never executed: return "OPTIONS"; | 0 | ||||||||||||||||||||||||
| 62 | case executed 38 times by 3 tests: QHttpNetworkRequest::Put:case QHttpNetworkRequest::Put:Executed by:
executed 38 times by 3 tests: case QHttpNetworkRequest::Put:Executed by:
| 38 | ||||||||||||||||||||||||
| 63 | return executed 38 times by 3 tests: "PUT";return "PUT";Executed by:
executed 38 times by 3 tests: return "PUT";Executed by:
| 38 | ||||||||||||||||||||||||
| 64 | case executed 7 times by 1 test: QHttpNetworkRequest::Delete:case QHttpNetworkRequest::Delete:Executed by:
executed 7 times by 1 test: case QHttpNetworkRequest::Delete:Executed by:
| 7 | ||||||||||||||||||||||||
| 65 | return executed 7 times by 1 test: "DELETE";return "DELETE";Executed by:
executed 7 times by 1 test: return "DELETE";Executed by:
| 7 | ||||||||||||||||||||||||
| 66 | case never executed: QHttpNetworkRequest::Trace:case QHttpNetworkRequest::Trace:never executed: case QHttpNetworkRequest::Trace: | 0 | ||||||||||||||||||||||||
| 67 | return never executed: "TRACE";return "TRACE";never executed: return "TRACE"; | 0 | ||||||||||||||||||||||||
| 68 | case never executed: QHttpNetworkRequest::Connect:case QHttpNetworkRequest::Connect:never executed: case QHttpNetworkRequest::Connect: | 0 | ||||||||||||||||||||||||
| 69 | return never executed: "CONNECT";return "CONNECT";never executed: return "CONNECT"; | 0 | ||||||||||||||||||||||||
| 70 | case executed 7 times by 1 test: QHttpNetworkRequest::Custom:case QHttpNetworkRequest::Custom:Executed by:
executed 7 times by 1 test: case QHttpNetworkRequest::Custom:Executed by:
| 7 | ||||||||||||||||||||||||
| 71 | return executed 7 times by 1 test: d->customVerb;return d->customVerb;Executed by:
executed 7 times by 1 test: return d->customVerb;Executed by:
| 7 | ||||||||||||||||||||||||
| 72 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||
| 73 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 74 | } | - | ||||||||||||||||||||||||
| 75 | return never executed: QByteArray();return QByteArray();never executed: return QByteArray(); | 0 | ||||||||||||||||||||||||
| 76 | } | - | ||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||
| 78 | QByteArray QHttpNetworkRequest::uri(bool throughProxy) const | - | ||||||||||||||||||||||||
| 79 | { | - | ||||||||||||||||||||||||
| 80 | QUrl::FormattingOptions format(QUrl::RemoveFragment | QUrl::RemoveUserInfo | QUrl::FullyEncoded); | - | ||||||||||||||||||||||||
| 81 | - | |||||||||||||||||||||||||
| 82 | - | |||||||||||||||||||||||||
| 83 | if (d->operation == QHttpNetworkRequest::Post
| 0-1773 | ||||||||||||||||||||||||
| 84 | format |= QUrl::RemoveQuery; never executed: format |= QUrl::RemoveQuery; | 0 | ||||||||||||||||||||||||
| 85 | - | |||||||||||||||||||||||||
| 86 | if (!throughProxy
| 99-1922 | ||||||||||||||||||||||||
| 87 | format |= QUrl::RemoveScheme | QUrl::RemoveAuthority; executed 1922 times by 8 tests: format |= QUrl::RemoveScheme | QUrl::RemoveAuthority;Executed by:
| 1922 | ||||||||||||||||||||||||
| 88 | QUrl copy = d->url; | - | ||||||||||||||||||||||||
| 89 | if (copy.path().isEmpty()
| 253-1768 | ||||||||||||||||||||||||
| 90 | copy.setPath(([]() -> QString { enum { Size = sizeof(u"" "/")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 253 times by 6 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 253 times by 6 tests: }()));return qstring_literal_temp;Executed by:
executed 253 times by 6 tests: copy.setPath(([]() -> QString { enum { Size = sizeof(u"" "/")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "/" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));Executed by:
| 253 | ||||||||||||||||||||||||
| 91 | QByteArray uri = copy.toEncoded(format); | - | ||||||||||||||||||||||||
| 92 | return executed 2021 times by 8 tests: uri;return uri;Executed by:
executed 2021 times by 8 tests: return uri;Executed by:
| 2021 | ||||||||||||||||||||||||
| 93 | } | - | ||||||||||||||||||||||||
| 94 | - | |||||||||||||||||||||||||
| 95 | QByteArray QHttpNetworkRequestPrivate::header(const QHttpNetworkRequest &request, bool throughProxy) | - | ||||||||||||||||||||||||
| 96 | { | - | ||||||||||||||||||||||||
| 97 | QList<QPair<QByteArray, QByteArray> > fields = request.header(); | - | ||||||||||||||||||||||||
| 98 | QByteArray ba; | - | ||||||||||||||||||||||||
| 99 | ba.reserve(40 + fields.length()*25); | - | ||||||||||||||||||||||||
| 100 | - | |||||||||||||||||||||||||
| 101 | ba += request.methodName(); | - | ||||||||||||||||||||||||
| 102 | ba += ' '; | - | ||||||||||||||||||||||||
| 103 | ba += request.uri(throughProxy); | - | ||||||||||||||||||||||||
| 104 | - | |||||||||||||||||||||||||
| 105 | ba += " HTTP/"; | - | ||||||||||||||||||||||||
| 106 | ba += QByteArray::number(request.majorVersion()); | - | ||||||||||||||||||||||||
| 107 | ba += '.'; | - | ||||||||||||||||||||||||
| 108 | ba += QByteArray::number(request.minorVersion()); | - | ||||||||||||||||||||||||
| 109 | ba += "\r\n"; | - | ||||||||||||||||||||||||
| 110 | - | |||||||||||||||||||||||||
| 111 | QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin(); | - | ||||||||||||||||||||||||
| 112 | QList<QPair<QByteArray, QByteArray> >::const_iterator endIt = fields.constEnd(); | - | ||||||||||||||||||||||||
| 113 | for (; it != endIt
| 1724-9299 | ||||||||||||||||||||||||
| 114 | ba += it->first; | - | ||||||||||||||||||||||||
| 115 | ba += ": "; | - | ||||||||||||||||||||||||
| 116 | ba += it->second; | - | ||||||||||||||||||||||||
| 117 | ba += "\r\n"; | - | ||||||||||||||||||||||||
| 118 | } executed 9299 times by 8 tests: end of blockExecuted by:
| 9299 | ||||||||||||||||||||||||
| 119 | if (request.d->operation == QHttpNetworkRequest::Post
| 187-1537 | ||||||||||||||||||||||||
| 120 | - | |||||||||||||||||||||||||
| 121 | if (request.headerField("content-type").isEmpty()
| 0-185 | ||||||||||||||||||||||||
| 122 | - | |||||||||||||||||||||||||
| 123 | - | |||||||||||||||||||||||||
| 124 | - | |||||||||||||||||||||||||
| 125 | QMessageLogger(__FILE__, 166, __PRETTY_FUNCTION__).warning("content-type missing in HTTP POST, defaulting to application/x-www-form-urlencoded. Use QNetworkRequest::setHeader() to fix this problem."); | - | ||||||||||||||||||||||||
| 126 | ba += "Content-Type: application/x-www-form-urlencoded\r\n"; | - | ||||||||||||||||||||||||
| 127 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||
| 128 | if (!request.d->uploadByteDevice
| 0-187 | ||||||||||||||||||||||||
| 129 | QByteArray query = request.d->url.query(QUrl::FullyEncoded).toLatin1(); | - | ||||||||||||||||||||||||
| 130 | ba += "Content-Length: "; | - | ||||||||||||||||||||||||
| 131 | ba += QByteArray::number(query.size()); | - | ||||||||||||||||||||||||
| 132 | ba += "\r\n\r\n"; | - | ||||||||||||||||||||||||
| 133 | ba += query; | - | ||||||||||||||||||||||||
| 134 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
| 135 | ba += "\r\n"; | - | ||||||||||||||||||||||||
| 136 | } executed 187 times by 3 tests: end of blockExecuted by:
| 187 | ||||||||||||||||||||||||
| 137 | } else { | - | ||||||||||||||||||||||||
| 138 | ba += "\r\n"; | - | ||||||||||||||||||||||||
| 139 | } executed 1537 times by 7 tests: end of blockExecuted by:
| 1537 | ||||||||||||||||||||||||
| 140 | return executed 1724 times by 8 tests: ba;return ba;Executed by:
executed 1724 times by 8 tests: return ba;Executed by:
| 1724 | ||||||||||||||||||||||||
| 141 | } | - | ||||||||||||||||||||||||
| 142 | - | |||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||
| 144 | - | |||||||||||||||||||||||||
| 145 | - | |||||||||||||||||||||||||
| 146 | QHttpNetworkRequest::QHttpNetworkRequest(const QUrl &url, Operation operation, Priority priority) | - | ||||||||||||||||||||||||
| 147 | : d(new QHttpNetworkRequestPrivate(operation, priority, url)) | - | ||||||||||||||||||||||||
| 148 | { | - | ||||||||||||||||||||||||
| 149 | } executed 9653 times by 14 tests: end of blockExecuted by:
| 9653 | ||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||
| 151 | QHttpNetworkRequest::QHttpNetworkRequest(const QHttpNetworkRequest &other) | - | ||||||||||||||||||||||||
| 152 | : QHttpNetworkHeader(other), d(other.d) | - | ||||||||||||||||||||||||
| 153 | { | - | ||||||||||||||||||||||||
| 154 | } executed 12106 times by 8 tests: end of blockExecuted by:
| 12106 | ||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||
| 156 | QHttpNetworkRequest::~QHttpNetworkRequest() | - | ||||||||||||||||||||||||
| 157 | { | - | ||||||||||||||||||||||||
| 158 | } | - | ||||||||||||||||||||||||
| 159 | - | |||||||||||||||||||||||||
| 160 | QUrl QHttpNetworkRequest::url() const | - | ||||||||||||||||||||||||
| 161 | { | - | ||||||||||||||||||||||||
| 162 | return executed 8461 times by 8 tests: d->url;return d->url;Executed by:
executed 8461 times by 8 tests: return d->url;Executed by:
| 8461 | ||||||||||||||||||||||||
| 163 | } | - | ||||||||||||||||||||||||
| 164 | void QHttpNetworkRequest::setUrl(const QUrl &url) | - | ||||||||||||||||||||||||
| 165 | { | - | ||||||||||||||||||||||||
| 166 | d->url = url; | - | ||||||||||||||||||||||||
| 167 | } executed 916 times by 8 tests: end of blockExecuted by:
| 916 | ||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||
| 169 | bool QHttpNetworkRequest::isSsl() const | - | ||||||||||||||||||||||||
| 170 | { | - | ||||||||||||||||||||||||
| 171 | return executed 1753 times by 8 tests: d->ssl;return d->ssl;Executed by:
executed 1753 times by 8 tests: return d->ssl;Executed by:
| 1753 | ||||||||||||||||||||||||
| 172 | } | - | ||||||||||||||||||||||||
| 173 | void QHttpNetworkRequest::setSsl(bool s) | - | ||||||||||||||||||||||||
| 174 | { | - | ||||||||||||||||||||||||
| 175 | d->ssl = s; | - | ||||||||||||||||||||||||
| 176 | } executed 890 times by 8 tests: end of blockExecuted by:
| 890 | ||||||||||||||||||||||||
| 177 | - | |||||||||||||||||||||||||
| 178 | bool QHttpNetworkRequest::isPreConnect() const | - | ||||||||||||||||||||||||
| 179 | { | - | ||||||||||||||||||||||||
| 180 | return executed 1646 times by 8 tests: d->preConnect;return d->preConnect;Executed by:
executed 1646 times by 8 tests: return d->preConnect;Executed by:
| 1646 | ||||||||||||||||||||||||
| 181 | } | - | ||||||||||||||||||||||||
| 182 | void QHttpNetworkRequest::setPreConnect(bool preConnect) | - | ||||||||||||||||||||||||
| 183 | { | - | ||||||||||||||||||||||||
| 184 | d->preConnect = preConnect; | - | ||||||||||||||||||||||||
| 185 | } executed 890 times by 8 tests: end of blockExecuted by:
| 890 | ||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||
| 187 | bool QHttpNetworkRequest::isFollowRedirects() const | - | ||||||||||||||||||||||||
| 188 | { | - | ||||||||||||||||||||||||
| 189 | return executed 15688 times by 7 tests: d->followRedirect;return d->followRedirect;Executed by:
executed 15688 times by 7 tests: return d->followRedirect;Executed by:
| 15688 | ||||||||||||||||||||||||
| 190 | } | - | ||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||
| 192 | void QHttpNetworkRequest::setFollowRedirects(bool followRedirect) | - | ||||||||||||||||||||||||
| 193 | { | - | ||||||||||||||||||||||||
| 194 | d->followRedirect = followRedirect; | - | ||||||||||||||||||||||||
| 195 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||
| 196 | - | |||||||||||||||||||||||||
| 197 | int QHttpNetworkRequest::redirectCount() const | - | ||||||||||||||||||||||||
| 198 | { | - | ||||||||||||||||||||||||
| 199 | return executed 11 times by 1 test: d->redirectCount;return d->redirectCount;Executed by:
executed 11 times by 1 test: return d->redirectCount;Executed by:
| 11 | ||||||||||||||||||||||||
| 200 | } | - | ||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||
| 202 | void QHttpNetworkRequest::setRedirectCount(int count) | - | ||||||||||||||||||||||||
| 203 | { | - | ||||||||||||||||||||||||
| 204 | d->redirectCount = count; | - | ||||||||||||||||||||||||
| 205 | } executed 890 times by 8 tests: end of blockExecuted by:
| 890 | ||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||
| 207 | qint64 QHttpNetworkRequest::contentLength() const | - | ||||||||||||||||||||||||
| 208 | { | - | ||||||||||||||||||||||||
| 209 | return executed 2643 times by 4 tests: d->contentLength();return d->contentLength();Executed by:
executed 2643 times by 4 tests: return d->contentLength();Executed by:
| 2643 | ||||||||||||||||||||||||
| 210 | } | - | ||||||||||||||||||||||||
| 211 | - | |||||||||||||||||||||||||
| 212 | void QHttpNetworkRequest::setContentLength(qint64 length) | - | ||||||||||||||||||||||||
| 213 | { | - | ||||||||||||||||||||||||
| 214 | d->setContentLength(length); | - | ||||||||||||||||||||||||
| 215 | } executed 200 times by 4 tests: end of blockExecuted by:
| 200 | ||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||
| 217 | QList<QPair<QByteArray, QByteArray> > QHttpNetworkRequest::header() const | - | ||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||
| 219 | return executed 3273 times by 8 tests: d->fields;return d->fields;Executed by:
executed 3273 times by 8 tests: return d->fields;Executed by:
| 3273 | ||||||||||||||||||||||||
| 220 | } | - | ||||||||||||||||||||||||
| 221 | - | |||||||||||||||||||||||||
| 222 | QByteArray QHttpNetworkRequest::headerField(const QByteArray &name, const QByteArray &defaultValue) const | - | ||||||||||||||||||||||||
| 223 | { | - | ||||||||||||||||||||||||
| 224 | return executed 8571 times by 8 tests: d->headerField(name, defaultValue);return d->headerField(name, defaultValue);Executed by:
executed 8571 times by 8 tests: return d->headerField(name, defaultValue);Executed by:
| 8571 | ||||||||||||||||||||||||
| 225 | } | - | ||||||||||||||||||||||||
| 226 | - | |||||||||||||||||||||||||
| 227 | void QHttpNetworkRequest::setHeaderField(const QByteArray &name, const QByteArray &data) | - | ||||||||||||||||||||||||
| 228 | { | - | ||||||||||||||||||||||||
| 229 | d->setHeaderField(name, data); | - | ||||||||||||||||||||||||
| 230 | } executed 8739 times by 8 tests: end of blockExecuted by:
| 8739 | ||||||||||||||||||||||||
| 231 | - | |||||||||||||||||||||||||
| 232 | QHttpNetworkRequest &QHttpNetworkRequest::operator=(const QHttpNetworkRequest &other) | - | ||||||||||||||||||||||||
| 233 | { | - | ||||||||||||||||||||||||
| 234 | d = other.d; | - | ||||||||||||||||||||||||
| 235 | return executed 5645 times by 8 tests: *this;return *this;Executed by:
executed 5645 times by 8 tests: return *this;Executed by:
| 5645 | ||||||||||||||||||||||||
| 236 | } | - | ||||||||||||||||||||||||
| 237 | - | |||||||||||||||||||||||||
| 238 | bool QHttpNetworkRequest::operator==(const QHttpNetworkRequest &other) const | - | ||||||||||||||||||||||||
| 239 | { | - | ||||||||||||||||||||||||
| 240 | return never executed: d->operator==(*other.d);return d->operator==(*other.d);never executed: return d->operator==(*other.d); | 0 | ||||||||||||||||||||||||
| 241 | } | - | ||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||
| 243 | QHttpNetworkRequest::Operation QHttpNetworkRequest::operation() const | - | ||||||||||||||||||||||||
| 244 | { | - | ||||||||||||||||||||||||
| 245 | return executed 2721 times by 7 tests: d->operation;return d->operation;Executed by:
executed 2721 times by 7 tests: return d->operation;Executed by:
| 2721 | ||||||||||||||||||||||||
| 246 | } | - | ||||||||||||||||||||||||
| 247 | - | |||||||||||||||||||||||||
| 248 | void QHttpNetworkRequest::setOperation(Operation operation) | - | ||||||||||||||||||||||||
| 249 | { | - | ||||||||||||||||||||||||
| 250 | d->operation = operation; | - | ||||||||||||||||||||||||
| 251 | } executed 887 times by 8 tests: end of blockExecuted by:
| 887 | ||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||
| 253 | QByteArray QHttpNetworkRequest::customVerb() const | - | ||||||||||||||||||||||||
| 254 | { | - | ||||||||||||||||||||||||
| 255 | return never executed: d->customVerb;return d->customVerb;never executed: return d->customVerb; | 0 | ||||||||||||||||||||||||
| 256 | } | - | ||||||||||||||||||||||||
| 257 | - | |||||||||||||||||||||||||
| 258 | void QHttpNetworkRequest::setCustomVerb(const QByteArray &customVerb) | - | ||||||||||||||||||||||||
| 259 | { | - | ||||||||||||||||||||||||
| 260 | d->customVerb = customVerb; | - | ||||||||||||||||||||||||
| 261 | } executed 7 times by 1 test: end of blockExecuted by:
| 7 | ||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||
| 263 | QHttpNetworkRequest::Priority QHttpNetworkRequest::priority() const | - | ||||||||||||||||||||||||
| 264 | { | - | ||||||||||||||||||||||||
| 265 | return executed 1903 times by 8 tests: d->priority;return d->priority;Executed by:
executed 1903 times by 8 tests: return d->priority;Executed by:
| 1903 | ||||||||||||||||||||||||
| 266 | } | - | ||||||||||||||||||||||||
| 267 | - | |||||||||||||||||||||||||
| 268 | void QHttpNetworkRequest::setPriority(Priority priority) | - | ||||||||||||||||||||||||
| 269 | { | - | ||||||||||||||||||||||||
| 270 | d->priority = priority; | - | ||||||||||||||||||||||||
| 271 | } executed 1086 times by 8 tests: end of blockExecuted by:
| 1086 | ||||||||||||||||||||||||
| 272 | - | |||||||||||||||||||||||||
| 273 | bool QHttpNetworkRequest::isPipeliningAllowed() const | - | ||||||||||||||||||||||||
| 274 | { | - | ||||||||||||||||||||||||
| 275 | return executed 3371 times by 2 tests: d->pipeliningAllowed;return d->pipeliningAllowed;Executed by:
executed 3371 times by 2 tests: return d->pipeliningAllowed;Executed by:
| 3371 | ||||||||||||||||||||||||
| 276 | } | - | ||||||||||||||||||||||||
| 277 | - | |||||||||||||||||||||||||
| 278 | void QHttpNetworkRequest::setPipeliningAllowed(bool b) | - | ||||||||||||||||||||||||
| 279 | { | - | ||||||||||||||||||||||||
| 280 | d->pipeliningAllowed = b; | - | ||||||||||||||||||||||||
| 281 | } executed 453 times by 2 tests: end of blockExecuted by:
| 453 | ||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||
| 283 | bool QHttpNetworkRequest::isSPDYAllowed() const | - | ||||||||||||||||||||||||
| 284 | { | - | ||||||||||||||||||||||||
| 285 | return executed 872 times by 8 tests: d->spdyAllowed;return d->spdyAllowed;Executed by:
executed 872 times by 8 tests: return d->spdyAllowed;Executed by:
| 872 | ||||||||||||||||||||||||
| 286 | } | - | ||||||||||||||||||||||||
| 287 | - | |||||||||||||||||||||||||
| 288 | void QHttpNetworkRequest::setSPDYAllowed(bool b) | - | ||||||||||||||||||||||||
| 289 | { | - | ||||||||||||||||||||||||
| 290 | d->spdyAllowed = b; | - | ||||||||||||||||||||||||
| 291 | } executed 113 times by 1 test: end of blockExecuted by:
| 113 | ||||||||||||||||||||||||
| 292 | - | |||||||||||||||||||||||||
| 293 | bool QHttpNetworkRequest::withCredentials() const | - | ||||||||||||||||||||||||
| 294 | { | - | ||||||||||||||||||||||||
| 295 | return executed 2108 times by 8 tests: d->withCredentials;return d->withCredentials;Executed by:
executed 2108 times by 8 tests: return d->withCredentials;Executed by:
| 2108 | ||||||||||||||||||||||||
| 296 | } | - | ||||||||||||||||||||||||
| 297 | - | |||||||||||||||||||||||||
| 298 | void QHttpNetworkRequest::setWithCredentials(bool b) | - | ||||||||||||||||||||||||
| 299 | { | - | ||||||||||||||||||||||||
| 300 | d->withCredentials = b; | - | ||||||||||||||||||||||||
| 301 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||
| 303 | void QHttpNetworkRequest::setUploadByteDevice(QNonContiguousByteDevice *bd) | - | ||||||||||||||||||||||||
| 304 | { | - | ||||||||||||||||||||||||
| 305 | d->uploadByteDevice = bd; | - | ||||||||||||||||||||||||
| 306 | } executed 201 times by 4 tests: end of blockExecuted by:
| 201 | ||||||||||||||||||||||||
| 307 | - | |||||||||||||||||||||||||
| 308 | QNonContiguousByteDevice* QHttpNetworkRequest::uploadByteDevice() const | - | ||||||||||||||||||||||||
| 309 | { | - | ||||||||||||||||||||||||
| 310 | return executed 12168 times by 8 tests: d->uploadByteDevice;return d->uploadByteDevice;Executed by:
executed 12168 times by 8 tests: return d->uploadByteDevice;Executed by:
| 12168 | ||||||||||||||||||||||||
| 311 | } | - | ||||||||||||||||||||||||
| 312 | - | |||||||||||||||||||||||||
| 313 | int QHttpNetworkRequest::majorVersion() const | - | ||||||||||||||||||||||||
| 314 | { | - | ||||||||||||||||||||||||
| 315 | return executed 1724 times by 8 tests: 1;return 1;Executed by:
executed 1724 times by 8 tests: return 1;Executed by:
| 1724 | ||||||||||||||||||||||||
| 316 | } | - | ||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||
| 318 | int QHttpNetworkRequest::minorVersion() const | - | ||||||||||||||||||||||||
| 319 | { | - | ||||||||||||||||||||||||
| 320 | return executed 1724 times by 8 tests: 1;return 1;Executed by:
executed 1724 times by 8 tests: return 1;Executed by:
| 1724 | ||||||||||||||||||||||||
| 321 | } | - | ||||||||||||||||||||||||
| 322 | - | |||||||||||||||||||||||||
| 323 | - | |||||||||||||||||||||||||
| 324 | - | |||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |