We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 043652b commit 04658e1Copy full SHA for 04658e1
1 file changed
http/http.go
@@ -388,8 +388,8 @@ func populateConsensusVersion(res *httpResponse, resp *http.Response) error {
388
respConsensusVersions, exists := resp.Header["Eth-Consensus-Version"]
389
if !exists {
390
// No consensus version supplied in response; obtain it from the body if possible.
391
- if res.contentType != ContentTypeJSON {
392
- // 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
393
// this is one of them.
394
return nil
395
}
0 commit comments