]> sjero.net Git - wget/commitdiff
[svn] If content-type is not given, assume text/html.
authorhniksic <devnull@localhost>
Tue, 16 Apr 2002 01:13:51 +0000 (18:13 -0700)
committerhniksic <devnull@localhost>
Tue, 16 Apr 2002 01:13:51 +0000 (18:13 -0700)
src/ChangeLog
src/http.c

index d9dd76bd6c552556163a372d560fd5e06533debe..5d733d60e2c83cc2de41eb2710f3bfc5b1018c1b 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-16  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * http.c (gethttp): If Content-Type is not given, assume
+       text/html.
+
 2002-04-15  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * recur.c (download_child_p): Don't ignore rejection of HTML
index ea286cd1818c19ee7979834052025da25113df5a..3c22bf6cc425b5854d719b642257e8566f14e85b 100644 (file)
@@ -1308,10 +1308,12 @@ Accept: %s\r\n\
        }
     }
 
-  if (type && !strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)))
+  /* If content-type is not given, assume text/html.  This is because
+     of the multitude of broken CGI's that "forget" to generate the
+     content-type.  */
+  if (!type || 0 == strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)))
     *dt |= TEXTHTML;
   else
-    /* We don't assume text/html by default.  */
     *dt &= ~TEXTHTML;
 
   if (opt.html_extension && (*dt & TEXTHTML))