aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/http2/server.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-15 07:35:23 -0400
committerGitHub <noreply@github.com>2020-10-15 07:35:23 -0400
commitd7a1e3fe2ab4e351c31645145526b02a4ae2709e (patch)
treec091e1935fb03c91131ea944beb725f6979022c0 /vendor/golang.org/x/net/http2/server.go
parentef7f584acf65692a6b2a11a352a8d09d8a604ff6 (diff)
parent9066292ee4015d6a3971acd1a69f15941128ed0f (diff)
downloadpodman-d7a1e3fe2ab4e351c31645145526b02a4ae2709e.tar.gz
podman-d7a1e3fe2ab4e351c31645145526b02a4ae2709e.tar.bz2
podman-d7a1e3fe2ab4e351c31645145526b02a4ae2709e.zip
Merge pull request #8003 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.3
Bump github.com/onsi/gomega from 1.10.2 to 1.10.3
Diffstat (limited to 'vendor/golang.org/x/net/http2/server.go')
-rw-r--r--vendor/golang.org/x/net/http2/server.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index 345b7cd85..2aa859f76 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -1694,6 +1694,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
if len(data) > 0 {
wrote, err := st.body.Write(data)
if err != nil {
+ sc.sendWindowUpdate(nil, int(f.Length)-wrote)
return streamError(id, ErrCodeStreamClosed)
}
if wrote != len(data) {
@@ -2020,7 +2021,11 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
}
if bodyOpen {
if vv, ok := rp.header["Content-Length"]; ok {
- req.ContentLength, _ = strconv.ParseInt(vv[0], 10, 64)
+ if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {
+ req.ContentLength = int64(cl)
+ } else {
+ req.ContentLength = 0
+ }
} else {
req.ContentLength = -1
}
@@ -2403,9 +2408,8 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
var ctype, clen string
if clen = rws.snapHeader.Get("Content-Length"); clen != "" {
rws.snapHeader.Del("Content-Length")
- clen64, err := strconv.ParseInt(clen, 10, 64)
- if err == nil && clen64 >= 0 {
- rws.sentContentLen = clen64
+ if cl, err := strconv.ParseUint(clen, 10, 63); err == nil {
+ rws.sentContentLen = int64(cl)
} else {
clen = ""
}