diff options
| author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-02-19 10:06:25 +0100 |
|---|---|---|
| committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-02-19 10:06:25 +0100 |
| commit | 30fd22b9574def54726e7b193127cc0c901c1b4c (patch) | |
| tree | 96dfc923044db0515064ba39d052d9ed577e3e40 /src/network/access/qhttpnetworkrequest.cpp | |
| parent | d7b0581c1c2ef60c08d238dae39298af6904918f (diff) | |
| parent | 6aa09bbce59828d028f6d1e81d2bfc6ba537aae1 (diff) | |
Merge remote-tracking branch 'origin/dev' into stable
Change-Id: Ice524edcc51373509f0023ae7f7c2963f4602f88
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
| -rw-r--r-- | src/network/access/qhttpnetworkrequest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index d9f9b555d7a..3786f9b9928 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -87,9 +87,9 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot && (preConnect == other.preConnect); } -QByteArray QHttpNetworkRequestPrivate::methodName() const +QByteArray QHttpNetworkRequest::methodName() const { - switch (operation) { + switch (d->operation) { case QHttpNetworkRequest::Get: return "GET"; case QHttpNetworkRequest::Head: @@ -107,24 +107,24 @@ QByteArray QHttpNetworkRequestPrivate::methodName() const case QHttpNetworkRequest::Connect: return "CONNECT"; case QHttpNetworkRequest::Custom: - return customVerb; + return d->customVerb; default: break; } return QByteArray(); } -QByteArray QHttpNetworkRequestPrivate::uri(bool throughProxy) const +QByteArray QHttpNetworkRequest::uri(bool throughProxy) const { QUrl::FormattingOptions format(QUrl::RemoveFragment | QUrl::RemoveUserInfo | QUrl::FullyEncoded); // for POST, query data is send as content - if (operation == QHttpNetworkRequest::Post && !uploadByteDevice) + if (d->operation == QHttpNetworkRequest::Post && !d->uploadByteDevice) format |= QUrl::RemoveQuery; // for requests through proxy, the Request-URI contains full url if (!throughProxy) format |= QUrl::RemoveScheme | QUrl::RemoveAuthority; - QUrl copy = url; + QUrl copy = d->url; if (copy.path().isEmpty()) copy.setPath(QStringLiteral("/")); QByteArray uri = copy.toEncoded(format); @@ -137,9 +137,9 @@ QByteArray QHttpNetworkRequestPrivate::header(const QHttpNetworkRequest &request QByteArray ba; ba.reserve(40 + fields.length()*25); // very rough lower bound estimation - ba += request.d->methodName(); + ba += request.methodName(); ba += ' '; - ba += request.d->uri(throughProxy); + ba += request.uri(throughProxy); ba += " HTTP/"; ba += QByteArray::number(request.majorVersion()); |
