summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* doc: Ensure clangqdoc sees declarationsMartin Smith2017-12-062-3/+10
| | | | | | | | | This update corrects several uses of #ifdef macros that needed updating because qdoc now uses clang to parse header files. Change-Id: I285efa4629a1a5d5bcbfaf701eeafbd0e9f1e43e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-062-4/+18
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-303-25/+21
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-282-12/+10
| |\ | | | | | | | | | Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
| | * QUdpSocket: Work around WSARecvMsg quirk relating to no control blockThiago Macieira2017-11-251-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WSARecvMsg does not return the sender in WSAMSG::name if WSAMSG::Control isn't set. This makes no sense, so I'm assuming it's an API quirk we need to work around. [ChangeLog][QtNetwork][QUdpSocket] Fixed a regression from Qt 5.9.3 caused by an apparent Win32 API quirk we triggered when using readDatagram(), resulting in an invalid QHostAddress sender address. receiveDatagram() was not affected. Task-number: QTBUG-64718 Change-Id: I71488efd29b645f7b228fffd14f9d84cc205c4b3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Handle HostNotFoundError correctly for HTTP/2Timur Pocheptsov2017-11-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When processing host lookup error if-statement only checks the connection type SPDY, which is not right - it could also be HTTP/2. As a bonus: QT_NO_SSL conditional inclusion is not needed - HTTP2 can be 'clear text' and SPDY enumerator is defined even in no-tls build (and is just a noop here). Also, improve our somewhat cryptic message in 'Should not happen' else branch - 'cannot dequeu' says nothing about HostNotFoundError. Task-number: QTBUG-64721 Change-Id: Ib0346b8717c2dbddaffab690298f3cae01e338ea Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-231-13/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | * Code cleanup in QNAMFilipe Azevedo2017-11-221-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The private class already store a QNetworkConfigurationManager and networkSessionRequired so it's not need to compute them again nor to instantiate temporary classes. Change-Id: I1bbd9439afa70c950ed6ec3e4fc63ddae4a5b259 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Thiago Macieira2017-11-308-68/+75
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-238-68/+75
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-171-1/+1
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QNetworkReply::ioHttpRedirectErrors(too-many-redirects) on RHEL 6.6 in CI. Conflicts: tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Task-number: QTBUG-64569 Change-Id: I7514fc0660c18fd3a3e1d0d0af3f15d879e3c6f4
| | | * qsslsocket_mac: handle 'OrLater' SslProtocols in verifySessionProtocol()Mikkel Krautz2017-11-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The verifySessionProtocol() method in the SecureTransport backend did not properly handle TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater. This commit teaches verifySessionProtocol() about them. It also adds TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater to the protocolServerSide() test in tst_qsslsocket. Backport from 5.10 to 5.9 (LTS). Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 9c765522d1c4f8090b5f5d391b1740fc4bd67664) Change-Id: I58c53bdf43e0f19b4506f3696d793f657eb4dc6f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * HTTP/2 - fix header processingTimur Pocheptsov2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | httpReply->setHeaderField does not simply append (name|value) pairs, it first erases all entries with the same name. This is quite wrong when we have _several_ 'Set-Cookie' headers, for example. Found while trying to login into a facebook account :) Task-number: QTBUG-64359 Change-Id: I51416ca3ba3d92b9414e4649e493d9cd88f6d9a0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-10/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | | * Fix indentationJesus Fernandez2017-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tabs and white spaces were mixed. Change-Id: I498944334b68b5c23a61e6f4ba6a0e8df77799c6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * QNativeSocketEngine/Win: fix getting the datagram destinationThiago Macieira2017-11-041-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like I never even tested this. There were two problems: 1) when we asked for the recvmsg and sendmsg functions, we used the wrong variable (socketDescriptor was still -1) 2) we extracted the destination addresses, but never set them in the QIpPacketHeader object The added tests confirm that this works on Windows, Linux, Darwin, FreeBSD. There also seems to be a problem, obtaining the destination address on an IPv4 socket with a dual-stack sender (I can reproduce that on FreeBSD, macOS and Windows, plus an old version of Linux). Task-number: QTBUG-63605 Change-Id: I638cf58bfa7b4e5fb386fffd14ea732bddbc0c42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-303-48/+58
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| | | * QSslSocket::waitForDisconnected(): flush write buffer before waitingAlex Trotsenko2017-10-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the plain socket might be blocked indefinitely on waiting for socket activity. This issue is tested by tst_QSslSocket::disconnectFromHostWhenConnected() which was unstable in CI. Task-number: QTBUG-64016 Change-Id: I6a1a111dea4d1d1adaf55e6a90c0c5f995a270af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Fix private includes in qhttp2protocolhandler_p.hJoerg Bornemann2017-10-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This file could not be included by user code in an installed Qt. Change-Id: Id222d56dda9ef47d010ab947efa01bf63ecac050 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Replace unneeded nullptr-checks with ASSERTSMårten Nordheim2017-10-271-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The manager and managerPrivate member variables are set in the constructor and never changed after that. Change-Id: I7cc2fd2eb3f50bdc529ed29485e74bf9c016b0c0 Coverity-Id: 185272 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Fix redirecting all the other methods for HTTP 307 and 308Mårten Nordheim2017-10-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4cf90b1f739c47383672de3d66b1d9d5427f5db made POST requests be redirected properly, but this wasn't enough and should have included every method/verb. Change-Id: I37b12dc9fdffcbf2aadbd2360d4fc2584c024939 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Add QNetworkRequest::ResourceTypeAttribute for use in QtWebKitKonstantin Tokarev2017-11-242-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Often requested feature in QtWebKit is reporting what kind of resource corresponds to particular QNetworkRequest, similarly to QWebEngineUrlRequestInfo::resourceType(). This information can be used to modify or block certain request types in user's implementation of QNAM::createRequest(). The only clean way to pass this data is via attributes of QNetworkRequest, so enum value needs to be reserved. It's unlikely to be used anywhere outside of QtWebKit, however this is already the case for SynchronousRequestAttribute. Change-Id: I51a258e5e4b78e6e823c30c48d0c644356de6b17 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | A temporary fix for CI: define macros from the missing if_types.hTimur Pocheptsov2017-11-232-1/+26
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of our CI machines has WatchOS SDK 3.2 which is missing net/if_types.h. This block integrations and until SDK is updated in VM, we provide the missing macros from if_types.h. To be removed ASAP. Task-number: QTBUG-64447 Change-Id: I202d3313b9a6a6d7bd29670f0bffc182d4660f81 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | QNetworkInterface - fix iOS/tvOS/watchOS buildsTimur Pocheptsov2017-11-163-1/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netinet/in_var.h, netinet6/in6_var.h, and net/if_media.h are missing in iPhoneOS.sdk(s). We only use several macros and data-structs from these headers, so to work-around the broken build we provide the missing definitionis. Task-number: QTBUG-64447 Change-Id: I1b8169c12b4f33959f949bbf29e80f639ab31ad3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | QSslSocketPrivate (SecureTransport) - add ALPN supportTimur Pocheptsov2017-11-141-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from iOS 11.0 (SDK) Apple has exposed two new functions: SSLSetALPNProtocols and SSLCopyALPNProtocols. This allows us to negotiate http/2 (and any other application layer protocol) via TLS on iOS. Unlike OpenSSL, SecureTransport's version is very limited - we have to compare protocols manually after the SSL handshake has finished. Still, this is better than nothing. These two functions are also declared in macOS SDK starting from 10.13, but unfortunately the symbols are missing and for now this feature is only enabled on iOS. Change-Id: I3ed2f287bfa864f8aca0c231171e804f7d6b8016 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QAbstractSocket: Add socketOption for the Path MTUThiago Macieira2017-11-146-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allow retrieving the value of the known PMTU for the current socket. This works on Linux (IPv6 and IPv4) and FreeBSD (IPv6 only) -- the other OSes don't have the necessary API. Note: do we need add IP_MTU_DISCOVER? Change-Id: I6e9274c1e7444ad48c81fffd14dcaf97a18ce335 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QNetworkInterface/Win: fix MTU of Windows loopback interfacesThiago Macieira2017-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We document that -1 is not a valid value. The Windows structure's type is unsigned, so the value is actually ULONG_MAX. Change-Id: Ic632b4163d784b83951cfffd14f668645c4da3a9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add a feature for DNS lookup supportUlf Hermann2017-11-084-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Exclude the relevant files from being built if it is disabled, and add QT_REQUIRE_CONFIG(dnslookup) to the headers. Change-Id: I3af298dc87d63c93f724928dd1135c20eba33045 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | QNetworkInterface: add MTUThiago Macieira2017-11-076-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added maxTransmissionUnit(). Change-Id: Iaf4157b7efa2416d898cfffd14d96b2970d6af87 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QNetworkInterface: Add the DNS eligibilityThiago Macieira2017-11-079-29/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added dnsEligibility() to QNetworkAddressEntry to indicate whether the address is eligible or not for publication in DNS or similar mechanisms. Change-Id: Id3ae5f853d964358ac1ab19b525334a426e0e052 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QNetworkInterface: add support for extracting address lifetimeThiago Macieira2017-11-076-2/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added preferredLifetime() and validityLifetime() to QNetworkAddressEntry that report the remaining lifetime of the address in the network interface. Change-Id: I292b84e2193979446e43344b0727642812cba630 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QNetworkInterface: Add type()Thiago Macieira2017-11-076-4/+265
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkInterface] Added type(). Change-Id: I7de033f80b0e4431b7f1ffff13f9a5592b5776e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QNetworkInterface: add a Linux backend directly using AF_NETLINKThiago Macieira2017-11-075-38/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us a lot greater detail in getting information than relying on getifaddrs() function. It is also the only way of getting some extra information we'll need in the future, like address lifetimes. The parser will also be helpful if we want to add a network interface monitor in the future, though I currently have no clue how to do the equivalent on macOS and Windows. This commit does not remove the support for getifaddrs() on Linux, but I will no longer add features to it. Note that Android does not support getifaddrs(), so this may be an improvement if AF_NETLINK works there. Change-Id: I3868166e5efc45538544fffd14d8e6f993e1eb91 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QSsl: use QT_CONFIG(feature) instead of hardcoded constantTimur Pocheptsov2017-11-072-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test OPENSSL_VERSION_NUMBER >= 0x1010000000L was introduced before 1.1 support. Now a couple of conditional inclusions can be converted into QT_CONFIG(opensslv11). Task-number: QTBUG-64275 Change-Id: I627e6b06f334deac70c827e463ecbfad879dfc24 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-0612-69/+265
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-0512-69/+265
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| | * | QRandomGenerator: add system() and global()Thiago Macieira2017-10-292-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | HTTP/2 - make protocol settings configurablev5.10.0-beta3Timur Pocheptsov2017-10-2610-68/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Recently we have updated our receive window size to a larger value. Unfortunately, this also results in auto-test pumping through more data, which probably takes more time on CI. At the moment we do not have any public API on QNAM's level to customize HTTP/2 parameters (aka 5.10/FF and so on). So we use the fact that QNAM is QObject and we can set a property on it. This property is our Http2::ProtocolParameters object that allows us to configure: - HPACK parameters (in 5.10 - noop) - session receive window size - different SETTINGS as described by RFC 7540, 6.5.2. 2. Undocumented environment variable to set ENABLE_PUSH is not needed anymore. 3. In 5.11 Http2::ProtocolParameter will become a public API and we'll introduce a new setter in QNAM. Change-Id: If08fd5e09e7c0b61cf9700b426b60b5837b6b2e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Modernize use of 'http' featureUlf Hermann2017-11-0633-126/+101
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Remove references to obsolete platformsJake Petroules2017-11-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-10-2618-290/+180
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-2418-290/+180
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| | * | QHstsStore - use qAsConst in a range-loopTimur Pocheptsov2017-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by clazy-range-loop. Change-Id: If43e8d127697f768dc7b1871dc9fef9dcc57ad54 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-235-24/+80
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | | * Fix cookie path matching for empty url pathMårten Nordheim2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path wouldn't match if the cookie's path was root ('/') and the URLs path was empty. Change-Id: I6dcd10f1fdf4f48f14e50f1b169cbdfda7005849 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * network: add a QT_CONFIG(bearermanagement) guardLiang Qi2017-10-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for QNetworkReplyHttpImplPrivate::startWaitForSession(). This amends 8a39384e907e830c907f73009f498c486b22bd20. Task-number: QTBUG-63847 Change-Id: Ic20a4ac3ab97ed25010e0679810ef64c3ff42c05 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Fix redirecting POST for HTTP 307 and 308Mårten Nordheim2017-10-173-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All POST requests that were redirected would previously turn into GET requests. This does not follow the standard for HTTP codes 307 and 308. Task-number: QTBUG-63142 Change-Id: Ibd25a9566066e589670a9bc34e5dc5111f8139d5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Open a session during redirects when neededMårten Nordheim2017-10-172-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when a session isn't needed (i.e. for localhost), the session is not opened at all. If a program (e.g. our tests) redirects from localhost to a different system (e.g. the qt network test servers, or the internet) it will wait for a session forever. So, we need to check if a session is needed for the redirect-target and then open one. It is usually opened in QNetworkReplyHttpImplPrivate::_q_startOperation Change-Id: Id3b78182a3fb3f63f0235ecb1fb665df8bd0c4ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * QNAM (redirects) - clear 'raw' headers before sending the next requestTimur Pocheptsov2017-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already cleared 'cookedHeaders', which is a QHash for 'known headers' (enumerators as keys instead of strings), now do the same for 'rawHeaders'- not to end up with some weird mix of headers from all possible redirect responses and the final response. Task-number: QTBUG-61300 Change-Id: Ifd6655c4167840bb00d29446d36ce65ba2d5491a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>