Go to file
Mandeep Sandhu f30641a7f8 Fix error signal supression for failed DNS lookups
Sometimes the signal QNetworkReply::error(QNetworkReply::NetworkError)
is not emitted for certain requests.

This happens under the following conditions:

* The hostname provided in the request is incorrect, i.e it will
  result in a DNS lookup failure.
* There is a previous request, for the _same_ host, already pending.

The first request that comes for the (incorrect hostname) url, gets
enqueued via QHttpNetworkConnectionPrivate::queueRequest(). Here,
after starting a DNS lookup, we mark the network state of this
connection as - "InProgress".

Now, if a second reuest comes for the same host, we use the existing
HTTP connection object as it's present in the cache. However, when
enqueing the request (in queueRequest()), we see that the network is
NOT in "Unknown" state and return immediately without adding this new
request to the list of pending lookups (via QHostInfo::lookupHost()).

To fix this issue, we should queue incoming lookup requests, even if
the current (HTTP) connection is in the "InProgress" state, so that we
can inform the requestor of a failed lookup. Since
QHostInfo::lookupHost() handles lookups for duplicate hostnames
properly, things should be fine even if multiple requests for the same
host have been enqueued.

Task-number: QTBUG-32911
Change-Id: I6a9c8430121e9a5a2d45983b6bda70c324437992
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-09-29 16:44:04 +02:00
bin Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
config.tests Allow Clang to compile without libc++ 2013-09-09 23:04:48 +02:00
dist Mark most of the contents of QtAlgorithms as deprecated. 2013-09-21 13:59:01 +02:00
doc Doc: Fix module names of multimedia examples in manifest-meta 2013-09-25 14:18:48 +02:00
examples QMacNativeWidget: Have example use a delegate 2013-09-26 22:25:10 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs iOS: Always use application bundle when building Qt applications 2013-09-27 12:43:17 +02:00
qmake qmake: add $$title() function to convert strings to title case 2013-09-24 14:33:00 +02:00
src Fix error signal supression for failed DNS lookups 2013-09-29 16:44:04 +02:00
tests QDateTime - Fix round-trip of second occurrence times 2013-09-27 21:47:55 +02:00
tools Fix configure warnings on Windows 7 with MSVC2010. 2013-09-25 13:39:14 +02:00
util QTimeZone - Define new class and api 2013-09-22 22:21:15 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QCommandLineParser! 2013-08-24 21:33:39 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Bring back Qt4 X11 session management functionality. 2013-09-13 11:47:06 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro Merge remote-tracking branch 'origin/stable' into dev 2013-06-27 13:06:38 +02:00
sync.profile put ANGLE includes in a QtANGLE subdir 2013-06-10 21:12:13 +02:00