Return an error text message if file handling is turned off.
This commit is contained in:
parent
391f589a90
commit
06961fc7c4
@ -50,7 +50,7 @@ func (h *FilesHandlers) Index(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (h *FilesHandlers) File(w http.ResponseWriter, r *http.Request) {
|
||||
if h.noFileHandling {
|
||||
w.WriteHeader(http.StatusServiceUnavailable)
|
||||
Error(w, http.StatusServiceUnavailable, "File handling is turned off.", "", r.Referer())
|
||||
return
|
||||
}
|
||||
r.URL.Path = httpr.Param(r, "filepath")
|
||||
|
Loading…
Reference in New Issue
Block a user