lfsapi/client: split header entries by ':', trim utf-8 spaces
This commit is contained in:
parent
8a51f2e238
commit
442dc02f7d
@ -100,12 +100,12 @@ func (c *Client) extraHeaders(u *url.URL) map[string][]string {
|
||||
m := make(map[string][]string, len(hdrs))
|
||||
|
||||
for _, hdr := range hdrs {
|
||||
parts := strings.SplitN(hdr, ": ", 2)
|
||||
parts := strings.SplitN(hdr, ":", 2)
|
||||
if len(parts) < 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
k, v := parts[0], parts[1]
|
||||
k, v := parts[0], strings.TrimSpace(parts[1])
|
||||
|
||||
m[k] = append(m[k], v)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user