aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--router.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/router.go b/router.go
index 5a77131..c843698 100644
--- a/router.go
+++ b/router.go
@@ -16,6 +16,11 @@ func (router *http_router_t) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
+ if len(segments) < 2 {
+ http.Error(w, "Blank system endpoint", http.StatusNotFound)
+ return
+ }
+
if segments[0] == ":" {
switch segments[1] {
case "static":