aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--router_http.go (renamed from router.go)10
1 files changed, 5 insertions, 5 deletions
diff --git a/router.go b/router_http.go
index c843698..abf47c2 100644
--- a/router.go
+++ b/router_http.go
@@ -16,12 +16,12 @@ 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] == ":" {
+ if len(segments) < 2 {
+ http.Error(w, "Blank system endpoint", http.StatusNotFound)
+ return
+ }
+
switch segments[1] {
case "static":
static_handler.ServeHTTP(w, r)