mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-11 02:26:38 +00:00
node: fix error condition in gzipResponseWriter.init() (#32896)
This commit is contained in:
parent
659342a523
commit
a3aae29845
1 changed files with 1 additions and 1 deletions
|
|
@ -500,7 +500,7 @@ func (w *gzipResponseWriter) init() {
|
||||||
hdr := w.resp.Header()
|
hdr := w.resp.Header()
|
||||||
length := hdr.Get("content-length")
|
length := hdr.Get("content-length")
|
||||||
if len(length) > 0 {
|
if len(length) > 0 {
|
||||||
if n, err := strconv.ParseUint(length, 10, 64); err != nil {
|
if n, err := strconv.ParseUint(length, 10, 64); err == nil {
|
||||||
w.hasLength = true
|
w.hasLength = true
|
||||||
w.contentLength = n
|
w.contentLength = n
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue