diff options
-rw-r--r-- | src/glaze.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glaze.go b/src/glaze.go index c70a2ec..959cf30 100644 --- a/src/glaze.go +++ b/src/glaze.go @@ -140,6 +140,14 @@ func handleDirectoryTarget(info pathInfo, w http.ResponseWriter, r *http.Request targetPath := withTrailingSlash(info.path) + r.URL.Path newInfo, fn, err := handlerForDynPath(targetPath) if err != nil { + is404 := + errors.Is(err, fs.ErrNotExist ) || + errors.Is(err, fs.ErrPermission) + if is404 { + httpError(w, http.StatusNotFound, err) + return nil + } + return err } |