qt - QUrl does not parse host name with underscore -


today found in qt 4.6, qurl not parse url if host name contains underscore.

i understand according standard, underscore not allowed in domain name, however, there urls underscores, subdomain.

for example, came across feed's url:

http://hero_hki.mysinablog.com/rss.php

and qurl("http://hero_hki.mysinablog.com/rss.php").tostring() returns "http:/rss.php"

firefox , google chrome can access page anyway.

(i tested qt 4.6 tp1. not sure whether issue fixed in release, cuz did not have time compile release version on laptop developing toy feed reader.)

any advice? :)

i read following qt 4.6.0 changelog:

qurl's parser more strict when hostnames in urls. qurl enforces std 3 rules:

  • each individual hostname section (between dots) must @ 63 ascii characters in length;

  • only letters, digits, , hyphen character allowed in ascii range; letters outside ascii range follow normal idn rules

that means qurl no longer accepts urls invalid before, weren't interpreted such.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -