summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-22 16:41:47 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-22 16:41:47 +0000
commit941ff50d2183999d8f1cbd249b6a892f70091ded (patch)
treea7ca22ab7df600e746c7fa69aff4926b7fc0294d /src
parentd14c3b75a8cabe4569b899785b2059e96e581227 (diff)
downloadtipidee-941ff50d2183999d8f1cbd249b6a892f70091ded.tar.gz
tipidee-941ff50d2183999d8f1cbd249b6a892f70091ded.tar.xz
tipidee-941ff50d2183999d8f1cbd249b6a892f70091ded.zip
Some fixes (thanks jjk)
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/libtipidee/tipidee_log_answer.c2
-rw-r--r--src/tipideed/responses.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libtipidee/tipidee_log_answer.c b/src/libtipidee/tipidee_log_answer.c
index 15dbe46..71c7762 100644
--- a/src/libtipidee/tipidee_log_answer.c
+++ b/src/libtipidee/tipidee_log_answer.c
@@ -10,7 +10,7 @@
 
 void tipidee_log_answer (uint32_t v, tipidee_rql const *rql, unsigned int status, uint64_t size)
 {
-  char const *a[6] = { PROG, ": info:" } ;
+  char const *a[8] = { PROG, ": info:" } ;
   size_t m = 2 ;
   char fmtstatus[UINT_FMT] ;
   char fmtsize[UINT64_FMT] ;
diff --git a/src/tipideed/responses.c b/src/tipideed/responses.c
index 3f42d85..81b8315 100644
--- a/src/tipideed/responses.c
+++ b/src/tipideed/responses.c
@@ -42,9 +42,9 @@ void response_error (tipidee_rql const *rql, char const *docroot, unsigned int s
   char const *file ;
   size_t salen = g.sa.len ;
   if (sarealpath(&g.sa, docroot) == -1 || !stralloc_0(&g.sa))
-      die500sys(rql, 111, docroot, "realpath ", docroot) ;
+    strerr_diefu2sys(111, "realpath ", docroot) ;
   if (strncmp(g.sa.s + salen, g.sa.s, g.cwdlen) || g.sa.s[salen + g.cwdlen] != '/')
-    die500x(rql, 102, docroot, "docroot ", docroot, " points outside of the server's root") ;
+    strerr_dief4x(102, "layout error: ", "docroot ", docroot, " points outside of the server's root") ;
   file = tipidee_conf_get_errorfile(&g.conf, g.sa.s + salen + g.cwdlen + 1, status) ;
   g.sa.len = salen ;
   if (!tipidee_util_defaulttext(status, &dt))
@@ -58,9 +58,9 @@ void response_error (tipidee_rql const *rql, char const *docroot, unsigned int s
   {
     int fd ;
     if (sarealpath(&g.sa, file) == -1 || !stralloc_0(&g.sa))
-      die500sys(rql, 111, docroot, "realpath ", file) ;
+      strerr_diefu2sys(111, "realpath ", file) ;
     if (strncmp(g.sa.s + salen, g.sa.s, g.cwdlen) || g.sa.s[salen + g.cwdlen] != '/')
-      die500x(rql, 102, docroot, "custom response file ", file, " points outside of the server's root") ;
+      strerr_dief4x(102, "layout error: ", "custom response file ", file, " points outside of the server's root") ;
     fd = open_read(g.sa.s + salen + g.cwdlen + 1) ;
     g.sa.len = salen ;
     if (fd == -1) strerr_warnwu3sys("open ", "custom response file ", file) ;