Skip to content

Commit 1394ea0

Browse files
authored
node: fix error condition in gzipResponseWriter.init() ethereum#32896 (#1888)
1 parent 6a3b92b commit 1394ea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

node/rpcstack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ func (w *gzipResponseWriter) init() {
498498
hdr := w.resp.Header()
499499
length := hdr.Get("content-length")
500500
if len(length) > 0 {
501-
if n, err := strconv.ParseUint(length, 10, 64); err != nil {
501+
if n, err := strconv.ParseUint(length, 10, 64); err == nil {
502502
w.hasLength = true
503503
w.contentLength = n
504504
}

0 commit comments

Comments
 (0)