summaryrefslogtreecommitdiff
path: root/src/stat_cache.c
diff options
context:
space:
mode:
authorMarcus Rückert <darix@opensu.se>2006-09-21 08:47:30 +0000
committerMarcus Rückert <darix@opensu.se>2006-09-21 08:47:30 +0000
commita57bb8202e4de02404fc29724c565c4bba183fd8 (patch)
treeb27ecad2653df737564c9e27d7f7445d0605c44d /src/stat_cache.c
parente9cc9ed36c1b3eb950fc95715863426e1a7b28ec (diff)
downloadlighttpd1.4-a57bb8202e4de02404fc29724c565c4bba183fd8.tar.gz
lighttpd1.4-a57bb8202e4de02404fc29724c565c4bba183fd8.zip
- fix logging of the path when using stat_cache debugging.
- always run symlink checks as it breaks otherwise git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1326 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/stat_cache.c')
-rw-r--r--src/stat_cache.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stat_cache.c b/src/stat_cache.c
index c6cb3d2e..bda9514d 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -527,7 +527,15 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
* */
#ifdef HAVE_LSTAT
sce->is_symlink = 0;
- if (!con->conf.follow_symlink) {
+ /*
+ * normally we want to only check for symlinks if we should block
+ * symlinks. for some weird reason it doesnt check for symlinks at all
+ * in some cases. so we disable it for now.
+ * this can have a little performance slow down.
+ *
+ * if (!con->conf.follow_symlink) {
+ */
+ if (1) {
if (stat_cache_lstat(srv, name, &lst) == 0) {
#ifdef DEBUG_STAT_CACHE
log_error_write(srv, __FILE__, __LINE__, "sb",
@@ -549,6 +557,7 @@ handler_t stat_cache_get_entry(server *srv, connection *con, buffer *name, stat_
while ((s_cur = strrchr(dname->ptr,'/'))) {
*s_cur = '\0';
+ dname->used = s_cur - dname->ptr + 1;
if (dname->ptr == s_cur) {
#ifdef DEBUG_STAT_CACHE
log_error_write(srv, __FILE__, __LINE__, "s", "reached /");