[svn] If content-type is not given, assume text/html.

This commit is contained in:
hniksic 2002-04-15 18:13:51 -07:00
parent 73fc84d889
commit 426bf23ae1
2 changed files with 9 additions and 2 deletions

View 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

View 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))