On Tuesday, 28 February 2017 17:43:19 UTC, Howard Guo wrote: > > As it is currently implemented, if http.ServerMux serves a FileServer on a > path beyond "/", for example "/mydir", and then serves a very different > document on "/", the FileServer handler will not be triggered at all and > the "/" handler gets all the requests. > > Is there a workaround so that FileServer(s) will continue to function, > even though a very different handler is installed on path "/" ? > > I believe your problem is that "/mydir" is a "rooted path", and you want a "rooted subtree". Adding a trailing slash, to "/mydir/", should give you the behaviour you desire.
The godoc for http.ServeMux breaks down this behaviour: https://godoc.org/net/http#ServeMux -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.