mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
This commit is contained in:
parent
86694df84e
commit
690db2853f
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:]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user