5ce009a2 by astaxie

fix bug

1 parent 8a995912
...@@ -147,7 +147,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -147,7 +147,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
147 for _, route := range p.fixrouters { 147 for _, route := range p.fixrouters {
148 n := len(requestPath) 148 n := len(requestPath)
149 if (requestPath[n-1] != '/' && route.pattern == requestPath) || 149 if (requestPath[n-1] != '/' && route.pattern == requestPath) ||
150 (len(route.pattern) >= n && requestPath[0:n-1] == route.pattern) { 150 (len(route.pattern) >= n && requestPath == route.pattern) {
151 runrouter = route 151 runrouter = route
152 findrouter = true 152 findrouter = true
153 break 153 break
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!