25 lines
315 B
Text
25 lines
315 B
Text
fmt := import("fmt")
|
|
paths := import("paths")
|
|
htmExt := func(c){
|
|
if c.is_compo {
|
|
return
|
|
}
|
|
c.pp.print(`
|
|
</body></html>
|
|
`)
|
|
}
|
|
|
|
exts := {
|
|
".htm": htmExt,
|
|
".html": htmExt
|
|
}
|
|
|
|
export func(c){
|
|
url_path := c.http.request.url.path
|
|
ext := paths.ext(url_path)
|
|
|
|
cl := exts[ext]
|
|
if !is_undefined(cl) {
|
|
cl(c)
|
|
}
|
|
}
|