summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QHttpMultiPart: supply new line at the end of the bodyPeter Hartmann2012-04-251-2/+2
| | | | | | | | | ... to conform to RFC 2046 (section 5.1.1). Apparently IIS had problems without the new line. Task-number: QTBUG-25429 Change-Id: Ia619bbdcebd407b2716bc467323634e4c8d77bcd Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix tst_qtcpserver::serverAddress on Mac OSXShane Kearns2012-04-241-1/+5
| | | | | | | | | | | | | While linux returns the local address of dual mode sockets as "::" i.e. the IPv6 address, OSX returns "::FFFF:0.0.0.0" i.e. the IPv4 address. In the unix socket engine, treat both of these as candidates for being a dual mode socket. This should hopefully cover other unixes which we haven't tested. Task-Number: QTBUG-25445 Change-Id: If1251018d54da98618223ba538c00ba54ac4cb4e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improved detection of libcrypto and libssl.Niels Weber2012-04-241-12/+51
| | | | | | | | | | | | | | The previous solution didn't work on systems where the libraries aren't in the same location. Now we search for both libcrypto and libssl and load them if their versions match, even if they are in different directories. Task-number: QTBUG-25398 Change-Id: I37164638890586947d07670d8a59fc53a84f9c42 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix bug in qsslsocket peek()Kalle Viironen2012-04-232-0/+54
| | | | | | | | | | | | | | | | | | Calling peek() for qsslsocket caused socket data to be copied into qiodevices buffer and therefore make it unaccessible in qsslsocket. Cherry picked form 4.8-branch & modified to Qt5 API changes (int -> qintptr) Original commits: commit 621f18955082fc73471e75d1f8c35c2dcd4befeb Author: Shane Kearns <ext-shane.2.kearns@nokia.com> commit 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513 Author: Kalle Viironen <kalle.viironen@digia.com> Task-number: QTBUG-18498 Change-Id: I6be4b19baec2f3197537f5e7b61432040ec84ad2 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows - "bypass proxy for local..." also affects IP addressesShane Kearns2012-04-201-2/+19
| | | | | | | | | | | | | | | | If the "bypass proxy for local addresses" option is enabled in the windows proxy configuration, then do not use the proxy for any IP address in the subnet of any network interface. As the systemProxyForQuery api is now offering HTTP proxy tunnels for TCP sockets, this change avoids local ad-hoc network connections being routed through the proxy. In the case where the local address was on a different interface to the proxy server, it may have been unreachable through the proxy. For example IP over USB or Bluetooth. Change-Id: I0842732832a7795112be029d923ed168edc008d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSslSocket: call to ERR_free_strings to free loaded error stringsMartin Petersson2012-04-203-0/+5
| | | | | | | | | | Since we are calling q_SSL_load_error_strings to load error strings we should call ERR_free_strings to free the memory again. Task-number: QTBUG-15732 Change-Id: Ie41291bb0e1434f82025378edfca51930712a8aa Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Abort background requests if policy changes to disallow themShane Kearns2012-04-192-9/+37
| | | | | | | | | | | | | Using the policy change signal from QNetworkSession. If the new policy disallows background requests and this is a background request, then generate an error. This results in a TCP RST on the socket, and a BackgroundRequestNotAllowedError on the QNetworkReply. If the reply is already finished, no action is taken. Change-Id: I4ff5c681a8b7b852727bb95f03664d666f4efe07 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Connect usagePoliciesChanged signal to the QNetworkReplyShane Kearns2012-04-194-0/+20
| | | | | Change-Id: Ibb8ba0b3226e402dfa9a5a1a64faa80702b11dd7 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Set ConnectInBackground also for http implementationShane Kearns2012-04-191-1/+3
| | | | | Change-Id: Id82322250d86f35702036c64d725c9d093046d5b Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* fix qsslsocket build in -permissive mode (assigning const char* to char*)Konstantin Ritt2012-04-191-1/+1
| | | | | Change-Id: I76269630ebabdf601c2fcb5f65a8dffbd6cdbc5e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Change coreservices -> iosIan Dean2012-04-193-6/+6
| | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-1727-190/+206
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-04-1611-90/+515
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/corelib/io/qurl.cpp src/gui/kernel/qwindow.cpp src/tools/moc/generator.cpp src/widgets/kernel/qwidget_qpa.cpp src/widgets/styles/qstyle.h src/widgets/widgets/qtabbar.cpp tests/auto/corelib/codecs/utf8/tst_utf8.cpp Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
| * | Fix error reporting in QNetworkReplyHttpImplPrivateShane Kearns2012-04-111-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When errors are detected synchronously in _q_startOperation, they were not reported. This is because unlike the generic QNetworkReplyImpl the function is called directly rather than using a queued connection. In order to report errors, use the _q_error and _q_finished slots so that signals are emitted after returning to the event loop i.e. after the application had a chance to connect the QNetworkReply Change-Id: I8a7bbe79a934f4634fb4e0572ebb5479dfc5f489 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Add autotest interface to get session from QNAMShane Kearns2012-04-112-0/+12
| | | | | | | | | | | | | | | | | | Change-Id: I7d8ea41299408377042a9f0d0a672e1a6fb57e7d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Check background requests are allowed before startingShane Kearns2012-04-112-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If background requests are not allowed, don't even attempt to start the network session, just fail the request immediately. After this change, a QNAM with mixed requests queued should behave as follows when background requests are disabled: - background requests at head of the queue fail - first foreground request starts the session and succeeds - remaining background requests fail - remaining foreground requests succeed If policy is changed on the fly, then running background requests are not aborted. However queued background requests won't be started. Change-Id: Ic9aba1eb59ca41b166a08d2ed09418e1b6af6b60 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Define usagePolicies API in QNetworkSessionShane Kearns2012-04-113-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the system to publish usage restrictions to applications related to the network in use. Currently there is only one restriction defined: NoBackgroundTrafficPolicy, which means that non user initiated traffic should be avoided (e.g. background downloads). For example this policy could be applied to save battery or data transfer charges. Change-Id: I49e26c0f3650d2b92f4ec51981aae9435b717b49 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Use NetworkSessionFailedError in QNetworkReplyShane Kearns2012-04-113-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Switched the error code. Republish the error string from the bearer plugin if possible. Change-Id: I9e4ac7a9914fbf2e87fe8fd3a5175deda6d933d2 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Define QNetworkReply::BackgroundRequestNotAllowedErrorShane Kearns2012-04-112-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Set ConnectInBackground based on requestShane Kearns2012-04-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the QNetworkSession attribute to match the QNetworkRequest that triggered it. Currently if there are a mix of normal and background requests queued and background connections are not allowed by policy: - background requests at the head of the queue should fail - first foreground request should successfully start a connection - remaining requests succeed regardless of background attribute Change-Id: If0e3ec0b8a5096e3d7cd6df85884c6f53172d233 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Define BackgroundRequestAttributeShane Kearns2012-04-112-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is so that the ConnectInBackground flag can be set on the QNetworkSession internal to QNAM according to pending requests. Change-Id: If0cc62f5117ed8febbbda7b7f6de62b11b274258 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
| * | Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-1013-16/+140
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * | | QHostAddress: improve qHash implementationGiuseppe D'Angelo2012-04-082-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the conversion to a temporary QString -- just hash the address as a byte array. Change-Id: Ic35cdbbc3ee66c32a28d911bd27de0092395979f Done-with: Shane Kearns Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * | | More qHash(T, uint) overloads for Qt typesGiuseppe D'Angelo2012-04-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The more we get in 5.0, the better. Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Port to the new QUrl APIThiago Macieira2012-03-305-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of any broken-down components of the query now needs QUrlQuery. The QUrl constructor and toString() are now rehabilitated and the preferred forms. Use toEncoded() and fromEncoded() now only when we need to store data in a QByteArray or the data comes from a QByteArray anyway. Change to toString() or the constructor if the data was in a QString. Change-Id: I9d761a628bef9c70185a48e927a61779a1642342 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * | | Port QHostAddress to use the new IP utilities in QtCoreThiago Macieira2012-03-281-132/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new code now generates lowercase hex instead of uppercase, so adapt the unit tests to pass. Also, "123.0.0" is now considered valid (compatibility with inet_aton). Change-Id: I07b5125abf60106dc5e706033d60836fb690a41f Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * | | Merge master into api_changesKent Hansen2012-03-271-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * | | | Optimise QHostAddress a littleThiago Macieira2012-03-231-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QHostAddress::setAddress(SpecialAddress), avoid parsing strings. Change-Id: Icb756b4c8b06c21dbc231f8c7f0b0dac29ed97c3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * | | | Merge master into api_changesKent Hansen2012-03-236-6/+11
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * \ \ \ \ Merge master into api_changesKent Hansen2012-03-167-51/+158
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * | | | | | QtNetwork: make some constructors explicitMarc Mutz2012-03-1410-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: Ia00eb9194a5f64002bd7e7b894abf6333d1b825e Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | | Fixed networkproxy build under WinCEBjoern Breitmeyer2012-04-162-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The used functionality is partially not available under WinCE. qnetworkfunctions_wince.h encapsulates the needed extra symbols. It only needs to compile as the functions are loaded dynamically. Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | | | Responses to request with AlwaysNetwork set should be cachedMartin Petersson2012-04-162-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the cache was not enabled if the request had AlwaysNetwork set. This removes the check for the CacheLoadControlAttribute when checking if the cache should be enabled. Task-number: QTBUG-15805 Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | | Trivial doc fix.Richard Moore2012-04-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I837c74d38b9f73aed41c3839421f5faad9d22f3f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | | Minor doc improvements.Richard Moore2012-04-161-0/+9
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic14cefcf935fea822c581013f437ae61b820ddd9 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | Added iOS compatibility.Qt4iOS2012-04-132-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put MacOS-specific code into #ifdef blocks to enable compilation on iOS. Change-Id: I0bb3846f457d1b3a56d99fe182b1718bc8429117 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | fixed compiling of QDnsRunner for wince and windows desktopBjoern Breitmeyer2012-04-121-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ce only has the utf16 variant desktop has all variants of the DnsQuery call. Unified it to the utf16 variant. Change-Id: Ic126c3f53da71c85a41a5c24c85970335700bcf0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | Fix autotest failures in QAbstractNetworkCacheShane Kearns2012-04-121-58/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache expiration calculation was previously removed to avoid calculating it every time an object is fetched from the cache. This is because the expiration date is calculated from max-age or expires headers when the object is added to the cache. However this broke the case where the server only provides a last-modified header. In this case, the expiration date needs to be checked at fetch time in order to add the warning if the object is >24h old. Change-Id: Iad381da0f91c27ac603abbaa94f268700ad2297f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | | Use windows API to update missing CA rootsShane Kearns2012-04-115-14/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows ships with a minimal set of CA roots. When using windows API to verify a certificate, it will fetch the root certificate from windows update (assuming it is part of the Microsoft trust program). As we are using openssl, this does not happen transparently. If SSL errors occur which indicate a broken chain then attempt to fix it using the windows API before emitting sslErrors. If the system CA certs are not in use (a CA bundle has been set on the socket or as the global configuration), then this is skipped. This is so an application can continue to use its own cert bundle rather than trusting the system certs. Key usage is specified, so that windows will return not trusted status if the root is not suitable for SSL (server auth or client auth OID). Testability: - to test, must delete the CA cert(s) from the "third party root certification authorities" section of the cert store using mmc.exe. - If the workaround of installing the windows XP cert bundle was performed, then you also need to delete certs from the "trusted root certification authorities" section. This is dangerous, be careful not to delete the required certificates which are documented on MS website - Naturally, modifying these areas of the cert store requires elevated privilege. Task-number: QTBUG-24827 Change-Id: I5cfe71c8a10595731f6bbbbabaaefa3313496654 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | | Modified project files to be iOS compatible.Qt4iOS2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed some MacOS source code files from iOS build. Use unix standard paths for now (iOS-specific implementation will come later). Change-Id: I8b2731b431b3a379a1ec4ec07d227e886209e3e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | | | | | Automatically query for Mac Proxy Server credentialsAron Rosenberg2012-04-112-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for automatically searching the Mac System Preferences for proxy server username/password. If a user has put credentials in the SystemPreferences->Network->Interface->Proxies area, we will now look in the KeyChain for those files. This will automatically pop up a Permissions dialog from the OS if valid credentials were found which match the server we are trying to access. Task-Number: QTBUG-22033 Change-Id: Ic7952afab4d16a65a87bb2f97a928c1c91167fe7 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | | Add Proxy Auto Config support (PAC) on MacAron Rosenberg2012-04-112-5/+113
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for fetching and parsing Proxy Auto Config files if one is specified in the Mac System Preferences Task-Number: QTBUG-2069 Task-Number: QTIFW-28 Change-Id: I91feb999222187e7467f2c41383904cf0cff8633 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | Find libssl on linux using paths of loaded librariesShane Kearns2012-04-051-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The installed path of libssl may include an element describing the architecture, e.g. x86_64-linux-gnu or i386-linux-gnu. In most cases, the libraries already loaded (static dependencies of Qt, such as libc) will include the path where libssl is installed. Use dl_iterate_phdr to find the paths. This is a linux specific function, but it does provide "/lib/<arch>" and "/usr/lib/<arch>" at the point ssl symbols are being resolved when running the qsslsocket autotest (which has less dependencies than a typical Qt app). Task-number: QTBUG-24694 Change-Id: I9af8081f41bb85c2fcff450a2acda5672a7f7518 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* | | | | Fix warnings about truncations in constants.Friedemann Kleint2012-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I46872c5b2866454112092c1ec5efbfe15db5af33 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Fixes a problem with the proxy detection on WindowsThierry2012-04-031-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current scheme is to use IE's default config. If that fails get the winhttp config. That's ok. The problem is that if you run a program as a service getting the IE config will set the fAutoDetect flag. But later the call to WinHttpGetProxyForUrl mightfail with the error code ERROR_WINHTTP_AUTODETECTION_FAILED. this patch just makes sure that we have a fallback winhttp solution in case the IE proxy is not set. The new code detcted if the current process is a service, in which case it will try to default to the system-wide proxy. Change-Id: I57e9082a46a8422c54f8f069715752c271a3a001 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | QNAM: close the channel if bytesAvailable and nothing piplinedMartin Petersson2012-04-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are still bytesAvailable on the socket and we have nothing pipelined we should close the channel. This was not done before as the chunked decoder did not read the last CRLF. This has now been fixed so this close should be enabled again. Task-number: QTBUG-24875 Change-Id: I115b60f8d78bf1b83d3fd5887ab3eb9940b6bf00 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | QAbstractSocket::waitForConnected check if host name is an IP addressMartin Petersson2012-04-021-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the current host name is an ip address we can create the QHostInfo directly instead of performing a reverse lookup. Task-number: QTBUG-18881 Change-Id: If239481e455f4f7fb74d978f685dc5d8e9f22c0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | | | Fix QTcpServer::listen() returning true when the port is in use on OS X.Robin Burchell2012-04-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Way back in the mists of time, someone added SO_REUSEPORT to socket binding, which was great, because otherwise it meant that multiple UDP sockets couldn't share the same port on OS X (as platforms with SO_REUSEPORT apparently don't support rebinding with SO_REUSEADDR). However: SO_REUSEPORT also means that *any* bind on a port will succeed, which is most definitely not wanted in the case of TCP sockets, so check the socket type before performing the actual bind. Also test that multiple listens don't take effect. Change-Id: I2f8d450bcfb8a7f3abd8918a4e789a850281dd13 Done-with: Thiago Macieira Done-with: Shane Kearns Task-number: QTBUG-6305 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>