summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreply.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add missing full stops in briefsPaul Wicking2018-06-211-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-161-1/+1
|\ | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| * Add support for HTTP status 308 Permanent RedirectMårten Nordheim2017-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 308 Permanent Redirect was introduced after redirection support was initially added to Qt. [ChangeLog][QtNetwork][QNetworkAccessManager] Added support for HTTP status 308. Task-number: QTBUG-63075 Change-Id: I1c6cda331d776237113ef8854de9abfe7e41ed3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix some qdoc warnings for 5.10Friedemann Kleint2017-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix comments for QRandomGenerator. src/corelib/io/qprocess.cpp:453: warning: Cannot find 'startDetached(...)' in '\fn' bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid) src/corelib/tools/qstringiterator.qdoc:122: warning: Cannot find 'QStringIterator(...)' in '\fn' QStringIterator::QStringIterator(QStringView string, QStringView::size_type idx) src/corelib/global/qrandom.cpp:902: warning: Can't link to 'QRandomGenerator' src/sql/kernel/qsqlerror.cpp:123: warning: Unknown command '\other' src/network/kernel/qhostinfo.cpp:296: warning: Unknown command '\other' src/gui/kernel/qplatformcursor.cpp:97: warning: Cannot find 'QPlatformCursor::OverrideCursor' specified with '\enum' in any header file src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkAccessManager::setRedirectsPolicy()' src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::RedirectsPolicyAttribute' Change-Id: Ibc2455b1b657716dfb6192615738dc7f924dbab3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * Doc: correct \sa statementNico Vertriest2017-04-211-3/+1
| | | | | | | | | | | | | | qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy' Change-Id: Ic96f834f3ca9984f626833e45e69f6322b83d12d Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Docs: Fix some warningsFriedemann Kleint2017-04-211-2/+2
|/ | | | | | | | | | | | | | | | | | | qtbase/src/corelib/tools/qbytearray.cpp:3043: warning: Can't link to '.' qtbase/src/corelib/tools/qstring.cpp:4522: warning: Can't link to '.' qtbase/src/corelib/tools/qstring.cpp:10331: warning: Can't link to '.' qtbase/src/network/access/qhstspolicy.cpp:105: warning: Undocumented parameter 'flags' in QHstsPolicy::QHstsPolicy() qtbase/src/network/access/qhstspolicy.cpp:105: warning: No such parameter 'includeSubDomains' in QHstsPolicy::QHstsPolicy() qtbase/src/network/access/qnetworkaccessmanager.cpp:732: warning: Undocumented parameter 'knownHosts' in QNetworkAccessManager::addStrictTransportSecurityHosts() qtbase/src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy' qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: No such enum item 'PdfFormat_1_4' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: Undocumented enum item 'PdfVersion_1_4' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: Undocumented enum item 'PdfVersion_A1b' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: No such enum item 'PdfFormat_A1b' in QPagedPaintDevice::PdfVersion qtbase/src/widgets/kernel/qopenglwidget.cpp:1076: warning: Undocumented parameter 'texFormat' in QOpenGLWidget::setTextureFormat() qtbase/src/corelib/tools/qversionnumber.cpp:460: warning: Command '\snippet (//! [3-latin1-1])' failed at end of file 'qversionnumber/main.cpp' Change-Id: Icc163dd8d94cee7e0858040bf8241a3c1f1d221d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* HSTS - API/naming fixesTimur Pocheptsov2017-02-231-1/+1
| | | | | | | | | | As recommended in API review: use 'is...STS...Enabled' and 'set...STS..Enabled(bool)' function names instead of stsEnabled and separate enable/disable functions. Replace QList with QVector in the public API. Change-Id: I1526124c830450058967ebc192d27575cc89292d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add HTTP strict tranport security support to QNAMTimur Pocheptsov2017-01-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | HTTP Strict Transport Security (HSTS) is a web security policy that allows a web server to declare that user agents should only interact with it using secure HTTPS connections. HSTS is described by RFC6797. This patch introduces a new API in Network Access Manager to enable this policy or disable it (default - STS is disabled). We also implement QHstsCache which caches known HTTS hosts, does host name lookup and domain name matching; QHstsHeaderParser to parse HSTS headers with HSTS policies. A new autotest added to test the caching, host name matching and headers parsing. [ChangeLog][QtNetwork] Added HTTP Strict Transport Security to QNAM Task-number: QTPM-238 Change-Id: Iabb5920344bf204a0d3036284f0d60675c29315c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add a user-controlled auto-redirect policyTimur Pocheptsov2017-01-191-0/+14
| | | | | | | | | | | | With this new policy, after emitting 'redirected', QNetworkReplyHttpImpl waits for client code to decide if QNAM should follow this redirect or not. The client can either allow this redirect by emitting 'redirectAllowed' or abort the reply. Task-number: QTPM-236 Change-Id: Ia04619f6bd1f0caa477833ae859b24033027b2e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Set the error for HTTP code 403 to be a ContentAccessDenied errorAndy Shaw2016-12-201-1/+1
| | | | | Change-Id: I1404bba998cdd7d426c8491908c53edcd3ebc7fb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-0/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * Note the introductory version of network redirection related enums.Jake Petroules2016-04-091-0/+2
| | | | | | | | | | | | | | | | | | These were missed in d815de8c26ccee33713e37a0fec2982755dcfe1f which originally added these values. Change-Id: I69618c90e71f7cc01eef3db477427759e62f626b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QNetworkAccessManager: Support HTTP redirectionMandeep Sandhu2015-03-091-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for following HTTP redirect responses on a per request basis. This behavior is disabled by default. It can be switched on by setting the QNetworkRequest::FollowRedirectAttribute to true. 2 new error codes have been added to QNetworkReply: * TooManyRedirectsError: Set when the number of redirects exceed a given value set by the user (defaults to 50 if not set) * UnsecureRedirectError: Set when we are redirecting from a 'https' to 'http' protocol. Test cases for the following scenarios: * Single HTTP redirect using local test server * Changing max-redirects * Testing all redirect related error scenarios The next commit will extend this feature at a QNAM level. Task-number: QTBUG-8232 Change-Id: If9e28ad12bad08bcdc5bc511b1cd59dc9d8150f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QNetworkAccessManager: introduce support for TLS PSKGiuseppe D'Angelo2015-01-231-0/+22
| | | | | | | | | | | | Expose the same kind of TLS PSK client support we already have set in place for QSslSocket. [ChangeLog][QtNetwork][QNetworkAccessManager] It is now possible to use TLS PSK ciphersuites when using HTTPS (or similar protocols working over SSL). Change-Id: I56a048e9f4f841f886758c781af2867d18538a3e Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: Fix typosSze Howe Koh2015-01-191-1/+1
| | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-2/+4
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * QNetworkReply::abort will also call finished()Albert Astals Cid2014-12-021-2/+4
| | | | | | | | | | Change-Id: I86e493178bf523c47eed36015354c0fbbebd56d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QNetworkRequest: Add new enum to emit all uploadProgress signalsPeter Hartmann2014-10-041-0/+1
|/ | | | | | | | | ... so that a user can have more fine-grained uploadProgress signal emissions if desired. Change-Id: I9f77fd80c100dbe249beaf3057e6e8974680ec59 Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: be more explicit about need to set expected SSL cert in errorsArnaud Bienner2014-05-271-1/+2
| | | | | | | | Note added in QNetworkReply and QSslSocket documentation. Task-number: QTBUG-16770 Change-Id: I2dd8cfb913ec29a96b5465a905cd213713b8d537 Reviewed-by: Richard J. Moore <rich@kde.org>
* Replace Note: with \note in documentationKurt Pattyn2014-03-131-2/+2
| | | | | | Change-Id: I213ac1fb2733e675f3641441fe6c621bab06c1f0 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Add more specific HTTP error codes to QNetworkReply::NetworkErrorMandeep Sandhu2014-01-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few more HTTP status codes from the 4xx and 5xx series have been added to QNetworkReply::NetworkError. For content errors, the following codes have been added: 1. 409 - Resource Conflict 2. 410 - Resource Gone For server related errors, the following codes have been added: 1. 500 - Internal Server Error 2. 501 - Operation Not Implemented 3. 503 - Service Unavailable Few of the above codes are quite possible when communicating with REST based services. NOTE: ===== * HTTP error status 400 is interpreted as QNetworkReply::ProtocolInvalidOperationError. * QNetworkReply::UnknownServerError is returned for all server related errors (5xx) not listed above. [ChangeLog][QtNetwork][QNetworkReply] Added more (specific) HTTP status codes to NetworkError enum. Task-number: QTBUG-30880 Change-Id: I9d2a133f6b3869f26710c6eb930dd8b08df31108 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-3/+3
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.Richard Moore2013-02-191-0/+25
| | | | | | | | | | | Add an encrypted signal to QNAM and QNetworkReply to allow applications to perform additional checks on the certificate chain beyond those done as part of the standard SSL validation. This allows things like certificate change notification to be implemented for QNAM as they can be for QSSLSocket currently. Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f Reviewed-by: Peter Hartmann <phartmann@rim.com>
* SSL docs: Be more explicit about the threats of ignoring SSL errorsPeter Hartmann2013-02-161-2/+7
| | | | | | | ... because almost everybody gets it wrong almost every time. Change-Id: I54938ef094323ba8de02186b585b11b9579f3ca4 Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix some documentation inconsistency in QtNetwork.Stephen Kelly2012-08-061-1/+1
| | | | | Change-Id: Id3e25480d4a8529813e02dc3d19f553a9263a363 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* choke downloadProgress signalsShane Kearns2012-06-141-0/+2
| | | | | | | | | | | | | | | | | | | The QNetworkReply::downloadProgress signal is intended for updating user interface components (e.g. a progress bar). Limit signal emissions to 10 times per second, with an additional signal just before the finished() signal to provide the 100% progress. For the size of download where a progress bar is necessary, this update frequency seems sufficient. The implementation is done by dropping signals which would be emitted less than 100ms after the previous signal emission. Task-number: QTBUG-20449 Change-Id: I9c2dbe16c70f3270cbf98f3c74cf9d9a3f0ab900 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Doc: Modularize QtNetwork documentation.Casper van Donderen2012-05-091-1/+1
| | | | | | | This change moves the snippets and imagesto the modularized directories. Change-Id: If14912692a7f72d7de345eaf88d9ec9752310fca Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Define QNetworkReply::BackgroundRequestNotAllowedErrorShane Kearns2012-04-111-0/+3
| | | | | | | | | | This error will be used when background network requests are not allowed according to the current policy of the bearer plugin. For example, to save power when battery is low on a portable device. Change-Id: I866e115f8fdd046134da99ea895b7c1df0375f26 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Define QNetworkReply::NetworkSessionFailed errorShane Kearns2012-04-111-0/+3
| | | | | | | | | This is to replace the UnknownNetworkError which occurs when the internal QNetworkSession fails to start (e.g. no usable WLAN available) Change-Id: I2b14577c22e0acf8ff07be7e932f0dfe9ac89c33 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Test for QT_NO_SSL instead of QT_NO_OPENSSLShane Kearns2012-02-211-1/+1
| | | | | | | | Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Using proper virtual functions instead of Q_INVOKABLE tricks.Jonas M. Gastal2012-01-091-24/+45
| | | | | | | | | This mantains BC between version compiled with and without OPENSSL, which was the reason for the use of "runtime virtuals". Using proper virtuals should make code clearer. Change-Id: I24f141ebaab68c000c2d602b54addbae1679a424 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+795
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12