summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/htscore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/htscore.c b/src/htscore.c
index 1d1bc88..b342dc2 100644
--- a/src/htscore.c
+++ b/src/htscore.c
@@ -1044,8 +1044,9 @@ int httpmirror(char* url1, httrackp* opt) {
// ------------------------------------
// BOGUS MIME TYPE HACK II (the revenge)
// Check if we have a bogus MIME type
- if ( (is_hypertext_mime(opt,r.contenttype, urlfil)) /* Is HTML or Js, .. */
- || (may_be_hypertext_mime(opt,r.contenttype, urlfil)) /* Is real media, .. */
+ if (HTTP_IS_OK(r.statuscode) &&
+ (is_hypertext_mime(opt,r.contenttype, urlfil) /* Is HTML or Js, .. */
+ || may_be_hypertext_mime(opt,r.contenttype, urlfil)) /* Is real media, .. */
) {
if ((r.adr) && (r.size)) {
unsigned int map[256];