[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
This commit is contained in:
Glenn Strauss 2017-07-21 23:44:14 -04:00
parent adeec956c3
commit 7bda136e5f
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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>"));