Skip to content

Commit a3aae29

Browse files
authored
node: fix error condition in gzipResponseWriter.init() (#32896)
1 parent 659342a commit a3aae29

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
@@ -500,7 +500,7 @@ func (w *gzipResponseWriter) init() {
500500
hdr := w.resp.Header()
501501
length := hdr.Get("content-length")
502502
if len(length) > 0 {
503-
if n, err := strconv.ParseUint(length, 10, 64); err != nil {
503+
if n, err := strconv.ParseUint(length, 10, 64); err == nil {
504504
w.hasLength = true
505505
w.contentLength = n
506506
}

0 commit comments

Comments
 (0)