I'm try to use http.FileServer for static files like ico, jpg and
other. And i need to set my own 404 error page for absent files.
Please, add like in http.NotFoundHandler ability to set own function for error.
(Now i need to copy/paste some parts from
golang.org/src/pkg/net/http/fs.go to create own handler...
Thanks!
--
Vasiliy Tolstov,
Clodo.ru
e-mail: v.to...@selfip.ru
jabber: va...@selfip.ru
Hm.. Thanks! Can You provide some minimal example for that?
2012/4/20 Brad Fitzpatrick <brad...@golang.org>:
> You can also just wrap the ResponseWriter (it's just an interface) toHm.. Thanks! Can You provide some minimal example for that?
> intercept 404 statuses from the FileServer and write your own 404 message
> instead.
>
sorry, this will break the Go 1 API promise.
besides, once it's a var, changing it would affect other uses of the handler globally.