summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2016-09-17 15:56:58 +0000
committerbsiegert <bsiegert@pkgsrc.org>2016-09-17 15:56:58 +0000
commitf6b589eae3a73e9da14b5d89db45b6e24868ead5 (patch)
tree694b1f02c47ff02b68af135bf1f6b1d3b0e50c66 /lang
parent16a91da89a7007ba51977f7b9ad2c6d12b2075f6 (diff)
downloadpkgsrc-f6b589eae3a73e9da14b5d89db45b6e24868ead5.tar.gz
Patch a subtle data corruption issue where the HTTP/2 client sometimes
swallows the first byte of the request body. This will also be in the next point release.
Diffstat (limited to 'lang')
-rw-r--r--lang/go/Makefile3
-rw-r--r--lang/go/distinfo5
-rw-r--r--lang/go/patches/patch-lib_time_update.bash6
-rw-r--r--lang/go/patches/patch-src_net_http_h2__bundle.go37
4 files changed, 45 insertions, 6 deletions
diff --git a/lang/go/Makefile b/lang/go/Makefile
index 476ca36b48b..e460558420f 100644
--- a/lang/go/Makefile
+++ b/lang/go/Makefile
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.46 2016/08/31 14:15:33 jperkin Exp $
+# $NetBSD: Makefile,v 1.47 2016/09/17 15:56:58 bsiegert Exp $
.include "version.mk"
DISTNAME= go${GO_VERSION}.src
PKGNAME= go-${GO_VERSION}
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= https://storage.googleapis.com/golang/
diff --git a/lang/go/distinfo b/lang/go/distinfo
index 67caa06ecc4..75751d58102 100644
--- a/lang/go/distinfo
+++ b/lang/go/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.39 2016/09/10 09:09:23 bsiegert Exp $
+$NetBSD: distinfo,v 1.40 2016/09/17 15:56:58 bsiegert Exp $
SHA1 (go1.7.1.src.tar.gz) = 6df2097fd11014086f6b6015cd4777f3acf37b91
RMD160 (go1.7.1.src.tar.gz) = 378d3fd9d3d8b7e331b7ce4531a704afcbd32a75
SHA512 (go1.7.1.src.tar.gz) = eab2b44f44d05c62645756e05078c2a8b7e3c4d2413617a20a6659df22e4612bb2059cf4906ab81134421eb371903034c1b197bb5595c9af9901819b2b3330a3
Size (go1.7.1.src.tar.gz) = 14098889 bytes
-SHA1 (patch-lib_time_update.bash) = bcf565b97ae7898a9e5cef7686fe42c69bc0bba1
+SHA1 (patch-lib_time_update.bash) = 17d28ba574dd08735b58cf73487104a5df3b7684
SHA1 (patch-misc_io_clangwrap.sh) = cd91c47ba0fe7b6eb8009dd261c0c26c7d581c29
SHA1 (patch-src_crypto_x509_root__bsd.go) = 0eca1eafa967268ae9b224be4aeda347ebc91901
+SHA1 (patch-src_net_http_h2__bundle.go) = af6682edc3066ea5d7c2c3ecdc93927ee7c622d5
SHA1 (patch-src_syscall_syscall__solaris.go) = 436371947897dcba574a6dfecc6bbcd04f6e25b2
diff --git a/lang/go/patches/patch-lib_time_update.bash b/lang/go/patches/patch-lib_time_update.bash
index 677214f4537..d1fd585f0fa 100644
--- a/lang/go/patches/patch-lib_time_update.bash
+++ b/lang/go/patches/patch-lib_time_update.bash
@@ -1,8 +1,8 @@
-$NetBSD: patch-lib_time_update.bash,v 1.2 2015/12/22 20:44:40 bsiegert Exp $
+$NetBSD: patch-lib_time_update.bash,v 1.3 2016/09/17 15:56:58 bsiegert Exp $
---- lib/time/update.bash.orig 2015-12-03 00:52:58.000000000 +0000
+--- lib/time/update.bash.orig 2016-09-07 19:34:33.000000000 +0000
+++ lib/time/update.bash
-@@ -41,7 +41,7 @@ zip -0 -r ../../zoneinfo.zip *
+@@ -42,7 +42,7 @@ zip -0 -r ../../zoneinfo.zip *
cd ../..
echo
diff --git a/lang/go/patches/patch-src_net_http_h2__bundle.go b/lang/go/patches/patch-src_net_http_h2__bundle.go
new file mode 100644
index 00000000000..5ef3dceb5ea
--- /dev/null
+++ b/lang/go/patches/patch-src_net_http_h2__bundle.go
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_net_http_h2__bundle.go,v 1.1 2016/09/17 15:56:58 bsiegert Exp $
+
+From: Brad Fitzpatrick <bradfitz@golang.org>
+Date: Mon, 12 Sep 2016 14:44:02 +0000
+Subject: [PATCH] http2: don't sniff first Request.Body byte in Transport until we have a conn
+
+bodyAndLength mutates Request.Body if Request.ContentLength == 0,
+reading the first byte to determine whether it's actually empty or
+just undeclared. But we did that before we checked whether our
+connection was overloaded, which meant the caller could retry the
+request on an new or lesser-loaded connection, but then lose the first
+byte of the request.
+
+Updates golang/go#17071 (needs bundle into std before fixed)
+
+--- src/net/http/h2_bundle.go.orig 2016-09-07 19:34:35.000000000 +0000
++++ src/net/http/h2_bundle.go
+@@ -5486,9 +5486,6 @@ func (cc *http2ClientConn) RoundTrip(req
+ }
+ hasTrailers := trailers != ""
+
+- body, contentLen := http2bodyAndLength(req)
+- hasBody := body != nil
+-
+ cc.mu.Lock()
+ cc.lastActive = time.Now()
+ if cc.closed || !cc.canTakeNewRequestLocked() {
+@@ -5496,6 +5493,9 @@ func (cc *http2ClientConn) RoundTrip(req
+ return nil, http2errClientConnUnusable
+ }
+
++ body, contentLen := http2bodyAndLength(req)
++ hasBody := body != nil
++
+ // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
+ var requestedGzip bool
+ if !cc.t.disableCompression() &&