mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
This commit is contained in:
4
party.go
4
party.go
@@ -592,7 +592,7 @@ func (p *GardenParty) StaticContent(reqPath string, contentType string, content
|
|||||||
ctx.SetStatusCode(StatusOK)
|
ctx.SetStatusCode(StatusOK)
|
||||||
ctx.Response.SetBody(content)
|
ctx.Response.SetBody(content)
|
||||||
}
|
}
|
||||||
|
println("static content for reqpath: " + reqPath)
|
||||||
p.Get(reqPath, h)
|
p.Get(reqPath, h)
|
||||||
p.Head(reqPath, h)
|
p.Head(reqPath, h)
|
||||||
}
|
}
|
||||||
@@ -634,7 +634,7 @@ func fixPath(str string) string {
|
|||||||
|
|
||||||
strafter := strings.Replace(str, "//", Slash, -1)
|
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
|
//it's domain, remove the first slash
|
||||||
strafter = strafter[1:]
|
strafter = strafter[1:]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user