We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2507e73 commit 7511547Copy full SHA for 7511547
1 file changed
http/http.go
@@ -370,8 +370,8 @@ func populateConsensusVersion(res *httpResponse, resp *http.Response) error {
370
respConsensusVersions, exists := resp.Header["Eth-Consensus-Version"]
371
if !exists {
372
// No consensus version supplied in response; obtain it from the body if possible.
373
- if res.contentType != ContentTypeJSON {
374
- // Not present here either. Many responses do not provide this information, so assume
+ if res.contentType != ContentTypeJSON || res.body == nil || len(res.body) == 0 {
+ // Not present here either. Many responses do not provide this information, so assume
375
// this is one of them.
376
return nil
377
}
0 commit comments