about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-21 20:37:13 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-21 20:37:13 +0000
commitabecd1f9e7a7d1d802be83156ac2f8720f2e977b (patch)
tree475cd246202b5a848cd8b976cf286e8ea9062bfd
parent5fca55de8de3976be01c15141f3edc667a07d750 (diff)
downloadtipidee-abecd1f9e7a7d1d802be83156ac2f8720f2e977b.tar.gz
tipidee-abecd1f9e7a7d1d802be83156ac2f8720f2e977b.tar.xz
tipidee-abecd1f9e7a7d1d802be83156ac2f8720f2e977b.zip
Some bugfixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rwxr-xr-xconfigure11
-rw-r--r--doc/tipidee.conf.html8
-rw-r--r--doc/tipideed.html2
-rw-r--r--src/tipideed/tipideed.c13
4 files changed, 15 insertions, 19 deletions
diff --git a/configure b/configure
index a835ee0..60c9c45 100755
--- a/configure
+++ b/configure
@@ -45,7 +45,6 @@ Optional features:
   --enable-slashpackage[=ROOT]  assume /package installation at ROOT [disabled]
   --enable-absolute-paths       do not rely on PATH to access this package's binaries,
                                   hardcode absolute BINDIR/foobar paths instead [disabled]
-  --enable-nsss                 use the nsss library for user information [disabled]
 
 EOF
 exit 0
@@ -148,7 +147,6 @@ static=true
 allpic=true
 slashpackage=false
 abspath=false
-usensss=false
 sproot=
 home=
 exthome=
@@ -190,8 +188,6 @@ for arg ; do
     --disable-slashpackage) sproot= ; slashpackage=false ;;
     --enable-absolute-paths|--enable-absolute-paths=yes) abspath=true ;;
     --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;;
-    --enable-nsss|--enable-nsss=yes) usensss=true ;;
-    --disable-nsss|--enable-nsss=no) usensss=false ;;
     --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
     --host=*|--target=*) target=${arg#*=} ;;
     --build=*) build=${arg#*=} ;;
@@ -444,13 +440,6 @@ if $allpic ; then
 else
   echo "STATIC_LIBS_ARE_PIC :="
 fi
-if $usensss ; then
-  echo "LIBNSSS := -lnsss"
-  echo "MAYBEPTHREAD_LIB := -lpthread"
-else
-  echo "LIBNSSS :="
-  echo "MAYBEPTHREAD_LIB :="
-fi
 
 exec 1>&3 3>&-
 echo "  ... done."
diff --git a/doc/tipidee.conf.html b/doc/tipidee.conf.html
index 64e3d30..f328a62 100644
--- a/doc/tipidee.conf.html
+++ b/doc/tipidee.conf.html
@@ -583,10 +583,10 @@ while allowing the client to change the request method. You generally should not
    <li> <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-15.4.3"><tt>302</tt></a>: temporary redirection
 while allowing the client to change the request method. You generally should not need this. </li>
   </ul> </li>
- <li> <em>target</em> is the target of the redirection. It should be a full URL starting
-with <tt>http://</tt> or <tt>https://</tt>; it can also be a simple path, indicating a
-local redirection, in which case <a href="tipideed.html">tipideed</a> will process it
-under the requested host. </li>
+ <li> <em>target</em> is the target of the redirection. It must be a full URL starting
+with <tt>http://</tt> or <tt>https://</tt>. (If you want local redirection under the
+same virtual domain, this directive is not what you want: instead, you can make a
+symbolic link in your filesystem.) </li>
  <li> Unlike files or directories given as arguments in other local directives,
 <em>resource</em> does not need to exist in the filesystem.
 <a href="tipideed.html">tipideed</a> processes redirections <em>before</em> looking
diff --git a/doc/tipideed.html b/doc/tipideed.html
index 754f147..1b1b17c 100644
--- a/doc/tipideed.html
+++ b/doc/tipideed.html
@@ -339,7 +339,7 @@ and continues the loop </li>
 the wanted resource or a prefix (by directory) of the wanted resource. If it's
 the case, it answers with that redirection and continues the loop. </li>
    <li> It looks for a suitable resource in the filesystem, completing the
-request with index files if necessary, or substracting CGI INFO_PATHs if
+request with index files if necessary, or extracting CGI INFO_PATHs if
 necessary </li>
    <li> It uses the canonical path of the resource in the filesystem to look
 for resource attributes in its configuration. (Is this a CGI script? a NPH
diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c
index 7202bde..13e5d7b 100644
--- a/src/tipideed/tipideed.c
+++ b/src/tipideed/tipideed.c
@@ -140,6 +140,13 @@ static uint32_t get_uint32 (char const *key)
   return n ;
 }
 
+static void inittto (tain *tto, char const *key)
+{
+  uint32_t ms = get_uint32(key) ;
+  if (ms) tain_from_millisecs(tto, ms) ;
+  else *tto = tain_infinite_relative ;
+}
+
 static inline unsigned int indexify (tipidee_rql const *rql, char *s, struct stat *st)
 {
   unsigned int e = 0 ;
@@ -368,9 +375,9 @@ int main (int argc, char const *const *argv, char const *const *envp)
   }
 
   prep_env() ;
-  tain_from_millisecs(&g.readtto, get_uint32("G:read_timeout")) ;
-  tain_from_millisecs(&g.writetto, get_uint32("G:write_timeout")) ;
-  tain_from_millisecs(&g.cgitto, get_uint32("G:cgi_timeout")) ;
+  inittto(&g.readtto, "G:read_timeout") ;
+  inittto(&g.writetto, "G:write_timeout") ;
+  inittto(&g.cgitto, "G:cgi_timeout") ;
   g.maxrqbody = get_uint32("G:max_request_body_length") ;
   g.maxcgibody = get_uint32("G:max_cgi_body_length") ;
   {