mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-08-08 23:03:47 +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")
|
hyphaName := util.HyphaNameFromRq(rq, "text")
|
||||||
switch h := hyphae.ByName(hyphaName).(type) {
|
switch h := hyphae.ByName(hyphaName).(type) {
|
||||||
case *hyphae.EmptyHypha:
|
case *hyphae.EmptyHypha:
|
||||||
default:
|
case *hyphae.NonEmptyHypha:
|
||||||
log.Println("Serving", h.TextPartPath())
|
if h.Kind() == hyphae.HyphaText {
|
||||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
log.Println("Serving", h.TextPartPath())
|
||||||
http.ServeFile(w, rq, h.TextPartPath())
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||||
|
http.ServeFile(w, rq, h.TextPartPath())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user