--- gforth/httpd.fs 2002/06/02 21:19:09 1.11 +++ gforth/httpd.fs 2003/08/25 14:17:45 1.14 @@ -1,6 +1,6 @@ #! /usr/local/bin/gforth -\ Copyright (C) 2000 Free Software Foundation, Inc. +\ Copyright (C) 2000,2002,2003 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -113,9 +113,9 @@ Variable htmldir : rework-htmldir ( addr u -- addr' u' / ior ) htmldir $! htmldir $@ compact.. htmldir $!len drop - htmldir $@ 3 min s" ../" compare 0= + htmldir $@ s" ../" string-prefix? IF -1 EXIT THEN \ can't access below current directory - htmldir $@ 1 min s" ~" compare 0= + htmldir $@ s" ~" string-prefix? IF UserDir $@ htmldir dup $@ 2dup '/ scan '/ skip nip - nip $ins ELSE DocumentRoot $@ htmldir 0 $ins THEN @@ -144,7 +144,7 @@ Variable htmldir : .connection ( -- ) ." Connection: " - connection $@ s" Keep-Alive" compare 0= maxnum @ 0> and + connection $@ s" Keep-Alive" str= maxnum @ 0> and IF connection $@ type cr ." Keep-Alive: timeout=15, max=" maxnum @ 0 .r cr -1 maxnum +! ELSE ." close" cr maxnum off THEN ;