Append query symbol to the path as well

This commit is contained in:
2022-02-02 23:16:42 +01:00
parent 87b4171629
commit c9748046b1
+5 -1
View File
@@ -49,7 +49,11 @@ func (r *Routes) usePostfixForce(c *routing.Context) (err error) {
fullPath = append(fullPath, '.')
fullPath = append(fullPath, []byte(templates.URLPostfix)...)
fullPath = c.QueryArgs().AppendBytes(fullPath)
if c.QueryArgs().Len() > 0 {
fullPath = append(fullPath, '?')
fullPath = c.QueryArgs().AppendBytes(fullPath)
}
return r.relativeRedirectBytes(c, fullPath, fasthttp.StatusFound)
}