mirror of
https://github.com/kataras/iris.git
synced 2026-01-25 12:55:57 +00:00
Add history for v3.0.0.-beta.2. Some fixes to subdomains listening on local 127.0.0.1. Change GetURI to ParseURI
Examples and e-book updated also.
This commit is contained in:
4
party.go
4
party.go
@@ -75,7 +75,7 @@ func (p *GardenParty) Handle(method string, registedPath string, handlers ...Han
|
||||
path = fixPath(absPath(p.relativePath, registedPath)) // "/xyz"
|
||||
}
|
||||
middleware := JoinMiddleware(p.middleware, handlers)
|
||||
route := NewRoute(method, path, middleware)
|
||||
route := NewRoute(method, path, middleware, p.station)
|
||||
p.station.plugins.DoPreHandle(route)
|
||||
p.station.addRoute(route)
|
||||
p.station.plugins.DoPostHandle(route)
|
||||
@@ -634,7 +634,7 @@ func fixPath(str string) string {
|
||||
|
||||
strafter := strings.Replace(str, "//", Slash, -1)
|
||||
|
||||
if strafter[0] == SlashByte && strings.Count(strafter, ".") >= 2 {
|
||||
if strafter[0] == SlashByte && strings.Contains(strafter, ".") {
|
||||
//it's domain, remove the first slash
|
||||
strafter = strafter[1:]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user