Browse Source

[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
personal/stbuehler/mod-csrf
Glenn Strauss 4 years ago
parent
commit
7bda136e5f
  1. 1
      src/mod_ssi.c
  2. 1
      src/mod_webdav.c

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

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

Loading…
Cancel
Save