From 8feb331858985e1345d862a677c51851b884d58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20R=C3=BCckert?= Date: Tue, 3 Jul 2007 17:16:21 +0000 Subject: [PATCH] - 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 --- src/etag.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/etag.c b/src/etag.c index c7bec73f..91207cab 100644 --- a/src/etag.c +++ b/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("-")); }