notFound returns a 404 error or, if pass-thru is enabled, it calls the next handler in the chain.
(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler)
| 731 | // notFound returns a 404 error or, if pass-thru is enabled, |
| 732 | // it calls the next handler in the chain. |
| 733 | func (fsrv *FileServer) notFound(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error { |
| 734 | if fsrv.PassThru { |
| 735 | return next.ServeHTTP(w, r) |
| 736 | } |
| 737 | return caddyhttp.Error(http.StatusNotFound, nil) |
| 738 | } |
| 739 | |
| 740 | // Indicates whether a file's modification time is useful for validator |
| 741 | // generation purposes (i.e. inclusion in ETag and Last-Modified headers). |
no test coverage detected