pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/go Patch a subtle data corruption issue where the...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a7cb5aed086a
branches: trunk
changeset: 352629:a7cb5aed086a
user: bsiegert <bsiegert%pkgsrc.org@localhost>
date: Sat Sep 17 15:56:58 2016 +0000
description:
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:
lang/go/Makefile | 3 +-
lang/go/distinfo | 5 +-
lang/go/patches/patch-lib_time_update.bash | 6 +-
lang/go/patches/patch-src_net_http_h2__bundle.go | 37 ++++++++++++++++++++++++
4 files changed, 45 insertions(+), 6 deletions(-)
diffs (88 lines):
diff -r 1ad9ad04f7e7 -r a7cb5aed086a lang/go/Makefile
--- a/lang/go/Makefile Sat Sep 17 15:33:59 2016 +0000
+++ b/lang/go/Makefile Sat Sep 17 15:56:58 2016 +0000
@@ -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 -r 1ad9ad04f7e7 -r a7cb5aed086a lang/go/distinfo
--- a/lang/go/distinfo Sat Sep 17 15:33:59 2016 +0000
+++ b/lang/go/distinfo Sat Sep 17 15:56:58 2016 +0000
@@ -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 -r 1ad9ad04f7e7 -r a7cb5aed086a lang/go/patches/patch-lib_time_update.bash
--- a/lang/go/patches/patch-lib_time_update.bash Sat Sep 17 15:33:59 2016 +0000
+++ b/lang/go/patches/patch-lib_time_update.bash Sat Sep 17 15:56:58 2016 +0000
@@ -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 -r 1ad9ad04f7e7 -r a7cb5aed086a lang/go/patches/patch-src_net_http_h2__bundle.go
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go/patches/patch-src_net_http_h2__bundle.go Sat Sep 17 15:56:58 2016 +0000
@@ -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@localhost>
+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() &&
Home |
Main Index |
Thread Index |
Old Index