net/http: response.ContentLength is only considering header key "Content-Length" case sensitive #65604
Labels
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Go version
go version go1.22.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I want to use
response.ContentLength
attribute.What did you see happen?
If the response header has e.g. the key
content-length
response.ContentLength is not set as only "Content-Length" is taken into account.What did you expect to see?
However afaik header keys are case insensitive. So, if a response contains
Content-Length
or e.g.content-length
as header should make no difference regarding theresponse.ContentLength
attribute.The text was updated successfully, but these errors were encountered: