--- src/http.c.orig 2013-03-17 23:39:06.757306072 +0100 +++ src/http.c 2013-03-17 23:36:57.001463866 +0100 @@ -1486,9 +1486,14 @@ /* If the file is there, we suppose it's retrieved OK. */ *dt |= RETROKF; - /* #### Bogusness alert. */ - /* If its suffix is "html" or "htm" or similar, assume text/html. */ - if (has_html_suffix_p (filename)) + // Since URL is usually not finishing with htm or html we + // assume the file it may be text/html file so we will be + // sure to check links to other pages (this happens when the + // downloaded page is kind of foo.php?abc=def&ghi=jk with + // this name we don't know if the resultant file is text/html + // or something else. This is even more unpredictible when + // the website has friendly URLs like /foo/abc/def/ghi/jk + // So we assume every file is text/html *dt |= TEXTHTML; }