summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-07-21 23:44:14 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-07-23 19:02:31 -0400
commit7bda136e5ffc6a551590a9b7cc8a1c12c19f612e (patch)
tree214038b5f392545671bb58f400bc107920a936cd
parentadeec956c39cdf57cd97027a7b3c734294b4f0a3 (diff)
downloadlighttpd1.4-7bda136e5ffc6a551590a9b7cc8a1c12c19f612e.tar.gz
lighttpd1.4-7bda136e5ffc6a551590a9b7cc8a1c12c19f612e.zip
[mod_webdav] PROPFIND getetag attr must match GET
PROPFIND getetag attr must match Etag response header from GET request For consistency, make similar change in mod_ssi. (thx ethoms) x-ref: "mod_webdav: Etag in response differs between PROPFIND and GET" https://redmine.lighttpd.net/boards/3/topics/7473
-rw-r--r--src/mod_ssi.c1
-rw-r--r--src/mod_webdav.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_ssi.c b/src/mod_ssi.c
index 3df6eb6e..8863676b 100644
--- a/src/mod_ssi.c
+++ b/src/mod_ssi.c
@@ -1240,6 +1240,7 @@ static int mod_ssi_handle_request(server *srv, connection *con, handler_ctx *p)
st.st_mtime = include_file_last_mtime;
etag_create(con->physical.etag, &st, con->etag_flags);
+ etag_mutate(con->physical.etag, con->physical.etag);
response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
mtime = strftime_cache_get(srv, st.st_mtime);
diff --git a/src/mod_webdav.c b/src/mod_webdav.c
index 804f0da2..d61c5b7b 100644
--- a/src/mod_webdav.c
+++ b/src/mod_webdav.c
@@ -978,6 +978,7 @@ static int webdav_get_live_property(server *srv, connection *con, handler_ctx *h
found = 1;
} else if (0 == strcmp(prop_name, "getetag")) {
etag_create(con->physical.etag, &sce->st, con->etag_flags);
+ etag_mutate(con->physical.etag, con->physical.etag);
buffer_append_string_len(b, CONST_STR_LEN("<D:getetag>"));
buffer_append_string_buffer(b, con->physical.etag);
buffer_append_string_len(b, CONST_STR_LEN("</D:getetag>"));