| Title | Images not loading for HTTP redirects |
|---|---|
| Author | rodarima |
| Created | Tue, 19 Nov 2024 08:37:24 +0000 |
| State | open |
Loading the website causes the images not to display. But following a link and then going back causes the images to properly load.
Reported-by: Flea86
I was just looking at the old site and saw that this behaviour is described as intentional:
If Dillo requests an image and receives a response containing a redirection (i.e., pointing to a different URL), the redirection is not followed. These have a strong tendency to be advertisements.
Another case is tilde.zone where the images are hosted at blob.jortage.com:
% curl -sI https://media.tilde.zone/accounts/avatars/110/702/530/752/342/503/original/37a30bf039ff6f46.png
HTTP/2 301
server: nginx/1.26.3
...
location: https://blob.jortage.com/blob2/RUTXnM2GDfhW-lR_/ZIpKlIexGJOYuDPHSVUy8ZupgseorCa3a4jrmGRVv_W31cq2XBXmaUVQV7EU41/oROj5s2w.png
Reported-by: the_jmcs
Reproducer:
The image returns a 301 redirect:
Dillo seems to ignore redirects on non-root requests like images:
https://github.com/dillo-browser/dillo/blob/f3103cc4b6c369da96c7de487214a9e56eca755d/src/cache.c#L1240-L1242
Also:
https://github.com/dillo-browser/dillo/blob/f3103cc4b6c369da96c7de487214a9e56eca755d/src/cache.c#L1102-L1107
This predates the git history (2007), so I don't know the context at which this was done. It looks simply unfinished.