[Development] QNetworkRequest: allow overriding connect host

Thiago Macieira thiago.macieira at intel.com
Fri May 10 03:44:18 CEST 2013


On quinta-feira, 9 de maio de 2013 18.00.36, Justin Karneges wrote:
> > I understand the feature would be useful in certain conditions, but I'm
> > not
> > sure yours is one of them. You can probably just easily override the
> > QNetworkAccessManager class and do the IP address verification. If it
> > fails, return a QNetworkReply that indicates the error condition. If it
> > passes, proceed with the actual QNetworkAccessManager call.
> 
> Hi Thiago,
> 
> You're saying to validate the IP address, and if that succeeds then 
> request the original URL? This would work most of the time, but it is 
> not airtight. The domain could end up resolving somewhere else after the 
> check succeeds.

QHostInfo has a short-lived cache, so it should work.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130509/c1027d05/attachment.sig>


More information about the Development mailing list