From 690db2853f3b1fae2afbe6d56fb754e5bde118e0 Mon Sep 17 00:00:00 2001 From: Makis Maropoulos Date: Mon, 6 Jun 2016 17:24:14 +0300 Subject: [PATCH] Fix https://github.com/kataras/iris/issues/172 --- party.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/party.go b/party.go index 9baab984..b43e19ab 100644 --- a/party.go +++ b/party.go @@ -592,7 +592,7 @@ func (p *GardenParty) StaticContent(reqPath string, contentType string, content ctx.SetStatusCode(StatusOK) ctx.Response.SetBody(content) } - + println("static content for reqpath: " + reqPath) p.Get(reqPath, h) p.Head(reqPath, h) } @@ -634,7 +634,7 @@ func fixPath(str string) string { strafter := strings.Replace(str, "//", Slash, -1) - if strafter[0] == SlashByte && strings.Contains(strafter, ".") { + if strafter[0] == SlashByte && strings.Count(strafter, ".") >= 2 { //it's domain, remove the first slash strafter = strafter[1:] }