Merge branch 'master' into patch-1

This commit is contained in:
Bo-Yi Wu 2020-01-16 22:41:42 +08:00 committed by GitHub
commit dda12b9731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,6 @@
package gin
const stackBufSize = 128
// cleanPath is the URL version of path.Clean, it returns a canonical URL path
// for p, eliminating . and .. elements.
//
@ -21,6 +19,7 @@ const stackBufSize = 128
//
// If the result of this process is an empty string, "/" is returned.
func cleanPath(p string) string {
const stackBufSize = 128
// Turn empty string into "/"
if p == "" {
return "/"