TrimHeaderValue returns the "v[0:first space or semicolon]".
(v string)
| 1157 | |
| 1158 | // TrimHeaderValue returns the "v[0:first space or semicolon]". |
| 1159 | func TrimHeaderValue(v string) string { |
| 1160 | for i, char := range v { |
| 1161 | if char == ' ' || char == ';' { |
| 1162 | return v[:i] |
| 1163 | } |
| 1164 | } |
| 1165 | return v |
| 1166 | } |
| 1167 | |
| 1168 | // GetHeader returns the request header's value based on its name. |
| 1169 | func (ctx *Context) GetHeader(name string) string { |
no outgoing calls
no test coverage detected
searching dependent graphs…