forked from mirror/client_golang
Change responseWriterDelegator.written to int64
Change responseWriterDelegator.written to int64 so that responses bigger than 4GB could be properly observed on 32 bit systems.
This commit is contained in:
parent
e319516b0f
commit
288762e79c
|
@ -178,7 +178,7 @@ type responseWriterDelegator struct {
|
||||||
|
|
||||||
handler, method string
|
handler, method string
|
||||||
status int
|
status int
|
||||||
written int
|
written int64
|
||||||
wroteHeader bool
|
wroteHeader bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ func (r *responseWriterDelegator) Write(b []byte) (int, error) {
|
||||||
r.WriteHeader(http.StatusOK)
|
r.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
n, err := r.ResponseWriter.Write(b)
|
n, err := r.ResponseWriter.Write(b)
|
||||||
r.written += n
|
r.written += int64(n)
|
||||||
return n, err
|
return n, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue