mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-05 02:29:54 +00:00
Fix /text/
This commit is contained in:
parent
7fe232d742
commit
4890c21012
@ -140,10 +140,12 @@ func handlerText(w http.ResponseWriter, rq *http.Request) {
|
||||
hyphaName := util.HyphaNameFromRq(rq, "text")
|
||||
switch h := hyphae.ByName(hyphaName).(type) {
|
||||
case *hyphae.EmptyHypha:
|
||||
default:
|
||||
log.Println("Serving", h.TextPartPath())
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
http.ServeFile(w, rq, h.TextPartPath())
|
||||
case *hyphae.NonEmptyHypha:
|
||||
if h.Kind() == hyphae.HyphaText {
|
||||
log.Println("Serving", h.TextPartPath())
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
http.ServeFile(w, rq, h.TextPartPath())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user