MSP-2370 move string lowering to param func
This commit is contained in:
1 parent
82a6d1959a
commit
5d2e6753a0
3 files changed
+4
-6
No files matched your search
+2
-2
@@ -100,7 +100,7 @@ func (c *Context) SetContext(ctx context.Context) {
|
||||
func (c *Context) Param(name string) string {
|
||||
value := c.request.Header.Get(name)
|
||||
if value != "" {
|
||||
return value
|
||||
return strings.TrimSpace(value)
|
||||
}
|
||||
|
||||
if c.queryParams == nil {
|
||||
@@ -115,5 +115,5 @@ func (c *Context) Param(name string) string {
|
||||
}
|
||||
value = c.queryParams[strings.ToLower(name)]
|
||||
|
||||
return value
|
||||
return strings.TrimSpace(value)
|
||||
}
|
||||
Reference in new issue
Block a user