Browse Source

- we did not reset the etag buffer is the inode was not used for the

etag. we now reset the buffer explicitly and use buffer_append_* later
  on. This fixes the bug reported by glen in #1209.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1880 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.16
Marcus Rückert 15 years ago
parent
commit
8feb331858
  1. 6
      src/etag.c

6
src/etag.c

@ -10,9 +10,11 @@ int etag_is_equal(buffer *etag, const char *matches) {
int etag_create(buffer *etag, struct stat *st,etag_flags_t flags) {
if (0 == flags) return 0;
buffer_reset(etag);
if (flags & ETAG_USE_INODE) {
buffer_copy_off_t(etag, st->st_ino);
buffer_append_off_t(etag, st->st_ino);
buffer_append_string_len(etag, CONST_STR_LEN("-"));
}

Loading…
Cancel
Save