1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 12:57:05 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-11-29 10:57:03 +02:00
parent 8cf891ff25
commit 516348e354

View File

@@ -1531,7 +1531,10 @@ func (ctx *Context) URLParamSlice(name string) []string {
return values
}
sepPtr := ctx.app.ConfigurationReadOnly().GetURLParamSeparator()
var sep string
if sepPtr := ctx.app.ConfigurationReadOnly().GetURLParamSeparator(); sepPtr != nil {
sep = *sepPtr
}
normalizedValues := make([]string, 0, n)
for _, v := range values {
@@ -1539,13 +1542,11 @@ func (ctx *Context) URLParamSlice(name string) []string {
continue
}
if sepPtr != nil {
if sep := *sepPtr; sep != "" {
if sep != "" {
values := strings.Split(v, sep)
normalizedValues = append(normalizedValues, values...)
continue
}
}
normalizedValues = append(normalizedValues, v)
}