aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-01-06 14:50:12 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-01-12 17:40:12 +0100
commit0151e10b627fbfb82b7d633f3fc9703678ed4eaf (patch)
treedea285c6d5069c90e7e32694b24f60d7c10a94eb /vendor/golang.org/x/net
parent495884b3195de482dc610a2a002db7e053188a32 (diff)
downloadpodman-0151e10b627fbfb82b7d633f3fc9703678ed4eaf.tar.gz
podman-0151e10b627fbfb82b7d633f3fc9703678ed4eaf.tar.bz2
podman-0151e10b627fbfb82b7d633f3fc9703678ed4eaf.zip
update buildah to latest and use new network stack
Make sure buildah uses the new network stack. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/net')
-rw-r--r--vendor/golang.org/x/net/http2/transport.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 6d6f88589..b5e2ac64d 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -1213,6 +1213,9 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
return err
}
cc.addStreamLocked(cs) // assigns stream ID
+ if isConnectionCloseRequest(req) {
+ cc.doNotReuse = true
+ }
cc.mu.Unlock()
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
@@ -2313,7 +2316,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
cs.bytesRemain = res.ContentLength
res.Body = transportResponseBody{cs}
- if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" {
+ if cs.requestedGzip && asciiEqualFold(res.Header.Get("Content-Encoding"), "gzip") {
res.Header.Del("Content-Encoding")
res.Header.Del("Content-Length")
res.ContentLength = -1
@@ -2452,7 +2455,10 @@ func (b transportResponseBody) Close() error {
select {
case <-cs.donec:
case <-cs.ctx.Done():
- return cs.ctx.Err()
+ // See golang/go#49366: The net/http package can cancel the
+ // request context after the response body is fully read.
+ // Don't treat this as an error.
+ return nil
case <-cs.reqCancel:
return errRequestCanceled
}