Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[PATCH] Lighttpd 1.4.37 mod_ssi: remove ETag and Last-Modified Headers from response/output.
--- a/src/mod_ssi.c 2015-05-14 11:34:41.000000000 +0200
+++ b/src/mod_ssi.c 2015-09-20 14:15:16.927322005 +0200
@@ -36,7 +36,6 @@
# include <sys/filio.h>
#endif
-#include "etag.h"
#include "version.h"
/* The newest modified time of included files for include statement */
@@ -1037,23 +1036,6 @@
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(p->conf.content_type));
}
- {
- /* Generate "ETag" & "Last-Modified" headers */
- time_t lm_time = 0;
- buffer *mtime = NULL;
-
- etag_mutate(con->physical.etag, sce->etag);
- response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
-
- if (sce->st.st_mtime > include_file_last_mtime)
- lm_time = sce->st.st_mtime;
- else
- lm_time = include_file_last_mtime;
-
- mtime = strftime_cache_get(srv, lm_time);
- response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
- }
-
/* Reset the modified time of included files */
include_file_last_mtime = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment