From 1eb87c5c59537557554adf0484f82076098279cd Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 26 Sep 2013 22:31:39 +0800 Subject: [PATCH] fix #225 --- context/input.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/context/input.go b/context/input.go index 303f10cc..c0ebb08b 100644 --- a/context/input.go +++ b/context/input.go @@ -40,7 +40,13 @@ func (input *BeegoInput) Site() string { } func (input *BeegoInput) Scheme() string { - return input.req.URL.Scheme + if input.req.URL.Scheme != "" { + return input.req.URL.Scheme + } else if input.req.TLS == nil { + return "http" + } else { + return "https" + } } func (input *BeegoInput) Domain() string {