We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea96b35 commit 47e619eCopy full SHA for 47e619e
1 file changed
http/http.go
@@ -375,8 +375,8 @@ func populateConsensusVersion(res *httpResponse, resp *http.Response) error {
375
respConsensusVersions, exists := resp.Header["Eth-Consensus-Version"]
376
if !exists {
377
// No consensus version supplied in response; obtain it from the body if possible.
378
- if res.contentType != ContentTypeJSON {
379
- // 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
380
// this is one of them.
381
return nil
382
}
0 commit comments