https://bugs.kde.org/show_bug.cgi?id=437515
Bug ID: 437515 Summary: FavIconsCache doesn't work for non-default ports Product: frameworks-kio Version: git master Platform: Debian unstable OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kio-bugs-n...@kde.org Reporter: danielrosc...@phoenitydawn.de CC: kdelibs-b...@kde.org Target Milestone: --- Created attachment 138687 --> https://bugs.kde.org/attachment.cgi?id=138687&action=edit Proposed patch to fix this issue SUMMARY FavIconsCache is supposed to fetch and cache favicons. However when trying to download the favicon, only scheme and host of the original URL are taken into consideration, but the port isn't. That leads to failing favicon downloads if the original URL uses a non-default port. An easy way to reproduce this behavior is by using Akregator. STEPS TO REPRODUCE 1. Create two temporary directories (e.g. /tmp/dir1 and /tmp/dir2) 2. Download an arbitrary RSS or Atom feed (e.g. curl https://kde.org/index.xml > /tmp/dir1/index.xml) 3. Download an icon to use as favicon (e.g. curl https://kde.org/favicon.ico > /tmp/dir1/favicon.ico) 4. Start a local webserver in the directory you stored the feed in on a non-default port (e.g. python3 -mhttp.server --directory /tmp/dir1 8080) 5. Start a second local webserver on the default HTTP port (e.g. sudo python3 -mhttp.server --directory /tmp/dir2 80) 6. Open Akregator and add the feed hosted by your local webserver on the non-default port (http://localhost:8080/index.xml) OBSERVED RESULT No favicon is shown in Akregator and the access log of the webserver serving the feed doesn't show any request for the favicon. The webserver running on port 80 does however show a request for the favicon. EXPECTED RESULT A favicon is shown in Akregator. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Akregator version: 5.15.3 KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION A tracked the bug down to src/core/faviconscache.cpp where the port isn't properly set when generating iconUrl: https://invent.kde.org/frameworks/kio/-/blob/master/src/core/faviconscache.cpp#L132-137 A fix should be trivial and I attached a patch I suspect would fix it. As I'm not into C++ and have no dev setup for KDE I couldn't test it however. -- You are receiving this mail because: You are watching all bug changes.