This commit is contained in:
GitLab Deploy Bot
2025-10-21 23:45:13 +07:00
parent 6c387b420c
commit bb60e987e5
3548 changed files with 4952576 additions and 116 deletions
+11
View File
@@ -0,0 +1,11 @@
package fasthttp
func addLeadingSlash(dst, src []byte) []byte {
// zero length 、"C:/" and "a" case
isDisk := len(src) > 2 && src[1] == ':'
if len(src) == 0 || (!isDisk && src[0] != '/') {
dst = append(dst, '/')
}
return dst
}