aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/about.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/loader/about.nim b/src/loader/about.nim
index f2ac6d74..054cee89 100644
--- a/src/loader/about.nim
+++ b/src/loader/about.nim
@@ -5,6 +5,7 @@ import loader/request
import types/url
const chawan = staticRead"res/chawan.html"
+const license = staticRead"res/license.html"
const HeaderTable = {
"Content-Type": "text/html"
}
@@ -22,5 +23,10 @@ proc loadAbout*(handle: LoaderHandle, request: Request) =
t handle.sendStatus(200) # ok
t handle.sendHeaders(newHeaders(HeaderTable))
t handle.sendData(chawan)
+ elif request.url.pathname == "license":
+ t handle.sendResult(0)
+ t handle.sendStatus(200) # ok
+ t handle.sendHeaders(newHeaders(HeaderTable))
+ t handle.sendData(license)
else:
t handle.sendResult(ERROR_ABOUT_PAGE_NOT_FOUND)