Browse Source

added possible for the caching of the invalid content-type

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1722 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.14
Jan Kneschke 15 years ago
parent
commit
a1a769ddb5
  1. 9
      src/mod_staticfile.c

9
src/mod_staticfile.c

@ -428,7 +428,16 @@ URIHANDLER_FUNC(mod_staticfile_subrequest) {
if (NULL == array_get_element(con->response.headers, "Content-Type")) {
if (buffer_is_empty(sce->content_type)) {
/* we are setting application/octet-stream, but also announce that
* this header field might change in the seconds few requests
*
* This should fix the aggressive caching of FF and the script download
* seen by the first installations
*/
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("application/octet-stream"));
#if 0
response_header_overwrite(srv, con, CONST_STR_LEN("Vary"), CONST_STR_LEN("Content-Type"));
#endif
} else {
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
}

Loading…
Cancel
Save