~mwhudson/+git/golang:master

Last commit made on 2016-05-01
Get this branch:
git clone -b master https://git.launchpad.net/~mwhudson/+git/golang
Only Michael Hudson-Doyle can upload to this branch. If you are Michael Hudson-Doyle please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~mwhudson/+git/golang

Recent commits

ade0eb2... by Keith Randall <email address hidden>

cmd/compile: fix reslice

:= is the wrong thing here. The new variable masks the old
variable so we allocate the slice afresh each time around the loop.

Change-Id: I759c30e1bfa88f40decca6dd7d1e051e14ca0844
Reviewed-on: https://go-review.googlesource.com/22679
Run-TryBot: Keith Randall <email address hidden>
TryBot-Result: Gobot Gobot <email address hidden>
Reviewed-by: Minux Ma <email address hidden>

24c05e7... by Brad Fitzpatrick <email address hidden>

net/http: fix typo in comment

Change-Id: I753e62879a56582a9511e3f34fdeac929202efbf
Reviewed-on: https://go-review.googlesource.com/22680
Reviewed-by: Ralph Corderoy <email address hidden>
Reviewed-by: Brad Fitzpatrick <email address hidden>

ca8b627... by Brad Fitzpatrick <email address hidden>

net/http: add Response.Uncompressed bool

The Transport's automatic gzip uncompression lost information in the
process (the compressed Content-Length, if known). Normally that's
okay, but it's not okay for reverse proxies which have to be able to
generate a valid HTTP response from the Transport's provided
*Response.

Reverse proxies should normally be disabling compression anyway and
just piping the compressed pipes though and not wasting CPU cycles
decompressing them. So also document that on the new Uncompressed
field.

Then, using the new field, fix Response.Write to not inject a bogus
"Connection: close" header when it doesn't see a transfer encoding or
content-length.

Updates #15366 (the http2 side remains, once this is submitted)

Change-Id: I476f40aa14cfa7aa7b3bf99021bebba4639f9640
Reviewed-on: https://go-review.googlesource.com/22671
Reviewed-by: Andrew Gerrand <email address hidden>
Run-TryBot: Brad Fitzpatrick <email address hidden>
TryBot-Result: Gobot Gobot <email address hidden>

a9cf0b1... by Brad Fitzpatrick <email address hidden>

net/http: provide access to the listener address an HTTP request arrived on

This adds a context key named LocalAddrContextKey (for now, see #15229) to
let users access the net.Addr of the net.Listener that accepted the connection
that sent an HTTP request. This is similar to ServerContextKey which provides
access to the *Server. (A Server may have multiple Listeners)

Fixes #6732

Change-Id: I74296307b68aaaab8df7ad4a143e11b5227b5e62
Reviewed-on: https://go-review.googlesource.com/22672
Reviewed-by: Andrew Gerrand <email address hidden>
Run-TryBot: Brad Fitzpatrick <email address hidden>
TryBot-Result: Gobot Gobot <email address hidden>

abc1472... by Brad Fitzpatrick <email address hidden>

net/http: add Transport.IdleConnTimeout

Don't keep idle HTTP client connections open forever. Add a new knob,
Transport.IdleConnTimeout, and make the default be 90 seconds. I
figure 90 seconds is more than a minute, and less than infinite, and I
figure enough code has things waking up once a minute polling APIs.

This also removes the Transport's idleCount field which was unused and
redundant with the size of the idleLRU map (which was actually used).

Change-Id: Ibb698a9a9a26f28e00a20fe7ed23f4afb20c2322
Reviewed-on: https://go-review.googlesource.com/22670
Reviewed-by: Andrew Gerrand <email address hidden>
Run-TryBot: Brad Fitzpatrick <email address hidden>
TryBot-Result: Gobot Gobot <email address hidden>

0ab78df... by Brad Fitzpatrick <email address hidden>

net/http: fix a few crashes with a ClientTrace with nil funcs

And add a test.

Updates #12580

Change-Id: Ia7eaba09b8e7fd0eddbcaefb948d01ab10af876e
Reviewed-on: https://go-review.googlesource.com/22659
Reviewed-by: Andrew Gerrand <email address hidden>
Run-TryBot: Brad Fitzpatrick <email address hidden>
TryBot-Result: Gobot Gobot <email address hidden>

b3a130e... by Brad Fitzpatrick <email address hidden>

net/http: document some errors more, mark ErrWriteAfterFlush as unused

Fixes #15150

Change-Id: I1a892d5b0516a37dac050d3bb448e0a2571db16e
Reviewed-on: https://go-review.googlesource.com/22658
Reviewed-by: Andrew Gerrand <email address hidden>

d713e8e... by Josh Bleecher Snyder <email address hidden>

archive/zip: improve BenchmarkCompressedZipGarbage

Before this CL:

$ go test -bench=CompressedZipGarbage -count=5 -run=NONE archive/zip
BenchmarkCompressedZipGarbage-8 50 20677087 ns/op 42973 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 100 20584764 ns/op 24294 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 50 20859221 ns/op 42973 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 100 20901176 ns/op 24294 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 50 21282409 ns/op 42973 B/op 47 allocs/op

The B/op number is effectively meaningless. There
is a surprisingly large one-time cost that gets
divided by the number of iterations that your
machine can get through in a second.

This CL discards the first run, which helps.
It is not a panacea. Running with -benchtime=10s
will allow the sync.Pool to be emptied,
which brings the problem back.
However, since there are more iterations to divide
the cost through, it’s not quite as bad,
and running with a high benchtime is rare.

This CL changes the meaning of the B/op number,
which is unfortunate, since it won’t have the
same order of magnitude as previous Go versions.
But it wasn’t really comparable before anyway,
since it didn’t have any reliable meaning at all.

After this CL:

$ go test -bench=CompressedZipGarbage -count=5 -run=NONE archive/zip
BenchmarkCompressedZipGarbage-8 100 20881890 ns/op 5616 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 50 20622757 ns/op 5616 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 50 20628193 ns/op 5616 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 100 20756612 ns/op 5616 B/op 47 allocs/op
BenchmarkCompressedZipGarbage-8 100 20639774 ns/op 5616 B/op 47 allocs/op

Change-Id: Iedee04f39328974c7fa272a6113d423e7ffce50f
Reviewed-on: https://go-review.googlesource.com/22585
Reviewed-by: Brad Fitzpatrick <email address hidden>

3836354... by Brad Fitzpatrick <email address hidden>

doc: update go1.7.txt

Change-Id: I53dd5affc3a1e1f741fe44c7ce691bb2cd432764
Reviewed-on: https://go-review.googlesource.com/22657
Reviewed-by: Brad Fitzpatrick <email address hidden>

3b0b307... by Cherry Zhang <email address hidden>

cmd/internal/obj/mips, cmd/link: add support TLS relocation for mips64x

a new relocation R_ADDRMIPSTLS is added, which resolves to 16-bit offset
of a TLS address on mips64x.

Change-Id: Ic60d0e1ba49ff1c433cead242f5884677ab227a5
Reviewed-on: https://go-review.googlesource.com/19804
Reviewed-by: Minux Ma <email address hidden>