mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 07:15:43 +00:00
.
This commit is contained in:
+11
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user