- 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 2007-07-03 17:16:21 +00:00
parent abdd1f5b45
commit 8feb331858
1 changed files with 4 additions and 2 deletions

View File

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