rc-httpd(8): avoid duplicate log output in dir-index handler
Delay calling do_log until just before emitting the response. This avoids calling do_log before potentially handing control to the static-index handler, which also calls do_log.
This commit is contained in:
parent
341b64b5bd
commit
78c7cd0c01
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,6 @@ if(! test -r $full_path -x $full_path){
|
|||
error 503
|
||||
exit
|
||||
}
|
||||
do_log 200
|
||||
builtin cd $full_path
|
||||
if(~ $"NOINDEXFILE ^ $"NOINDEX ''){
|
||||
ifile=index.htm*
|
||||
|
@ -30,6 +29,7 @@ case size
|
|||
case date
|
||||
lso=-t
|
||||
}
|
||||
do_log 200
|
||||
echo 'HTTP/1.1 200 OK'^$cr
|
||||
emit_extra_headers
|
||||
echo 'Content-type: text/html'^$cr
|
||||
|
|
Loading…
Reference in a new issue