forked from mirror/gin
path: sync code with httprouter (#2212)
This commit is contained in:
parent
424e9685be
commit
ace6e4c2ea
3
path.go
3
path.go
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
package gin
|
package gin
|
||||||
|
|
||||||
const stackBufSize = 128
|
|
||||||
|
|
||||||
// cleanPath is the URL version of path.Clean, it returns a canonical URL path
|
// cleanPath is the URL version of path.Clean, it returns a canonical URL path
|
||||||
// for p, eliminating . and .. elements.
|
// for p, eliminating . and .. elements.
|
||||||
//
|
//
|
||||||
|
@ -21,6 +19,7 @@ const stackBufSize = 128
|
||||||
//
|
//
|
||||||
// If the result of this process is an empty string, "/" is returned.
|
// If the result of this process is an empty string, "/" is returned.
|
||||||
func cleanPath(p string) string {
|
func cleanPath(p string) string {
|
||||||
|
const stackBufSize = 128
|
||||||
// Turn empty string into "/"
|
// Turn empty string into "/"
|
||||||
if p == "" {
|
if p == "" {
|
||||||
return "/"
|
return "/"
|
||||||
|
|
Loading…
Reference in New Issue