Details
Description
Any address in the 127.0.0.0/24 is localhost, but QHostAddress doesn't realise this. That means that code like this:
https://qt.gitorious.org/qt/qtbase/blobs/master/src/network/access/qnetworkaccessbackend.cpp#line374
will incorrectly think the address is remote. This matters because linux distros often set the machines name to 127.0.0.2, for example, my hosts file has:
127.0.0.2 marge.westpoint.ltd.uk marge
as well as the localhost line pointing at 127.0.0.1.
Attachments
For Gerrit Dashboard: QTBUG-22246 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
7187,3 | Network - Add QHostAddress::isLoopback API. | master | qt/qtbase | Status: MERGED | +2 | 0 |
7275,1 | Network - Use isLoopback API in place of existing localhost checks | master | qt/qtbase | Status: MERGED | +2 | 0 |