mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-03 06:27:47 +00:00
Add support for case-insensitive header names
This commit is contained in:
+1
-1
@@ -224,7 +224,7 @@ func (c *Client) doResp(conn net.Conn, req *Request) (*Response, error) {
|
||||
resp.Header.Add(header[0], header[1])
|
||||
}
|
||||
|
||||
if header[0] == "Content-Length" {
|
||||
if strings.ToLower(header[0]) == "content-length" {
|
||||
resp.ContentLength, err = strconv.ParseInt(header[1], 10, 64)
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
|
||||
Reference in New Issue
Block a user