- 06 Jan, 2016 33 commits
-
-
Russ Cox authored
This time with a test. Also adjust another test to skip when hg is not present, and delete no longer needed fixDetachedHead code. Fixes #9032 (again). Change-Id: I481717409e1d44b524f83c70a8dc377699d1a2a5 Reviewed-on: https://go-review.googlesource.com/18334Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #12542. Change-Id: Icd0fa84d891d6b1feab9b4d4dd319cdf1e6d6c48 Reviewed-on: https://go-review.googlesource.com/18336Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
But also cache the previous parsed form and don't reread if the size and modification time are both unchanged from before. On systems with stable /etc/hosts this should result in more stat calls but only a single parsing of /etc/hosts. On systems with variable /etc/hosts files (like some Docker systems) this should result in quicker adoption of changes. Fixes #13340. Change-Id: Iba93b204be73d6d903cd17c58038a4fcfd0952b9 Reviewed-on: https://go-review.googlesource.com/18258Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Add a couple more cases where we convert random network I/O errors into errRequestCanceled if the request was forcefully aborted. It failed ~1/1000 times without -race, or very easily with -race. (due to -race randomizing some scheduling) Fixes #11894 Change-Id: Ib1c123ce1eebdd88642da28a5948ca4f30581907 Reviewed-on: https://go-review.googlesource.com/18287Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
This shouldn't need to exist in general, but in practice I want something like this a few times per year. Change-Id: I9c220e58be44b7726f75d776f714212c570cf8bb Reviewed-on: https://go-review.googlesource.com/18286Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
The old link died; replace with an archive.org copy. Fixes #13345. Change-Id: Ic4a7fdcf258e1ff3b4a02ecb4f237ae7db2686c7 Reviewed-on: https://go-review.googlesource.com/18335Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Adds a test that both http1 and http2's Transport send a default User-Agent, with the same behavior. Updates bundled http2 to golang.org/x/net git rev 1ade16a545 (for https://go-review.googlesource.com/18285) The http1 behavior changes slightly: if req.Header["User-Agent"] is defined at all, even if it's nil or a zero-length slice, then the User-Agent header is omitted. This is a slight behavior change for http1, but is consistent with how http1 & http2 do optional headers elsewhere (such as "Date", "Content-Type"). The old behavior (set it explicitly to "", aka []string{""}) still works as before. And now there are even tests. Fixes #13685 Change-Id: I5786a6913b560de4a5f1f90e595fe320ff567adf Reviewed-on: https://go-review.googlesource.com/18284 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Robert Griesemer authored
The textual export data generated by gc sometimes contains forward references of packages. In rare cases such forward-referenced packages were not created when needed because no package name was present. Create unnamed packages in this case and set the name later when it becomes known. Fixes #13566. Change-Id: I193e0ec712e874030b194ab8ecb3fca140f7997a Reviewed-on: https://go-review.googlesource.com/18301Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
-
Russ Cox authored
This was supposed to be in CL 18204 but I submitted from the web instead of my computer and lost this final edit. Change-Id: I41598e936bb088d77f5e44752eda74222a4208c7 Reviewed-on: https://go-review.googlesource.com/18310Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
This was supposed to be in CL 18205 but I submitted via the web instead of from my computer, so it got lost. May deflake some things. Change-Id: I880fb74b5943b8a17f952a82639c60126701187a Reviewed-on: https://go-review.googlesource.com/18259Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Change-Id: I8ee338c1244fc4e2fb75deec752a7f83239c33ea Reviewed-on: https://go-review.googlesource.com/18257Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #13425. Change-Id: I82f49d07841e89fc4f3fde9ea41e710a634579d0 Reviewed-on: https://go-review.googlesource.com/18313Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #13781. Change-Id: Icfac8f2bfc3a4106f646409cfdc053df1e0cd76a Reviewed-on: https://go-review.googlesource.com/18314Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
Fixes #13693. Change-Id: Ieb89d8a8874ee8c6b304de99dceb07193c26b60e Reviewed-on: https://go-review.googlesource.com/18315Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
We don't use these for benchmarking anymore. Now we have the go1 dir and the benchmarks subrepo. Some have problematic copyright notices, so move out of main repo. Preserved in golang.org/x/exp/shootout. Fixes #12688. Fixes #13584. Change-Id: Ic0b71191ca1a286d33d7813aca94bab1617a1c82 Reviewed-on: https://go-review.googlesource.com/18320Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
This reverts commit ab096d58. Change-Id: Icf366aa43acc41b4f8474edae0297e554368bf14 Reviewed-on: https://go-review.googlesource.com/18321Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #13725. Change-Id: I5fe46851b238fc9ab301da8f8fc37bd1b7871748 Reviewed-on: https://go-review.googlesource.com/18316Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
Do not check DaylightName if DynamicDaylightTimeDisabled is false. Fixes #13502 Change-Id: I03e01ec0afdeb0037a5d3ee243674e5a6b559da5 Reviewed-on: https://go-review.googlesource.com/17998Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Tamir Duberstein authored
Simply checking the exit code of `git rev-parse --git-dir` should suffice here, but that requires deviating from the infrastructure provided by `run`, so I've left that for a future change. Fixes #11211. Change-Id: I7cbad86a8a06578f52f66f734f5447b597ddc962 Reviewed-on: https://go-review.googlesource.com/18213Reviewed-by: Russ Cox <rsc@golang.org>
-
Matthew Dempsky authored
Fixes #13821. Change-Id: I4a28a92d137edac3061537af25ac9d7aba411a66 Reviewed-on: https://go-review.googlesource.com/18262Reviewed-by: Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Since Stop was introduced, it would revert to the system default for the signal, rather than to the default Go behavior. Change it to revert to the default Go behavior. Change-Id: I345467ece0e49e31b2806d6fce2f1937b17905a6 Reviewed-on: https://go-review.googlesource.com/18229Reviewed-by: Russ Cox <rsc@golang.org>
-
Andrew Gerrand authored
Mention that: - connection pooling is enabled by default, - the Transport is safe for concurrent use, and - the Client type should be used for high-level stuff. Change-Id: Idfd8cc852e733c44211e77cf0e22720b1fdca39b Reviewed-on: https://go-review.googlesource.com/18273Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #13833 Change-Id: If0bd5f7dcfc39d34680d11eb998050f0900d5a26 Reviewed-on: https://go-review.googlesource.com/18283Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Update net/http's copy of http2 (sync as of x/net git rev 961116aee, aka https://golang.org/cl/18266) Also adds some CONNECT tests for #13717 (mostly a copy of http2's version of test, but in the main repo it also tests that http1 behaves the same) Fixes #13668 Fixes #13717 Change-Id: I7db93fe0b7c42bd17a43ef32953f2d20620dd3ea Reviewed-on: https://go-review.googlesource.com/18269 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Also reference the new Transport.ExpectContinueTimeout after the mention of 100-continue. Fixes #13721 Change-Id: I3445c011ed20f29128092c801c7a4bb4dd2b8351 Reviewed-on: https://go-review.googlesource.com/18281Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Ian Lance Taylor authored
Update #11845. Change-Id: I1c248dc48abc62e51836b9ba50d6deb89706c730 Reviewed-on: https://go-review.googlesource.com/18226Reviewed-by: Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Avoids an msan error when runtime/cgo is explicitly rebuilt with -fsanitize=memory. Fixes #13815. Change-Id: I70308034011fb308b63585bcd40b0d1e62ec93ef Reviewed-on: https://go-review.googlesource.com/18263Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Thanks to Kevin Kirsche (github kkirsche). Change-Id: Ia0017371f56065a5e88d1ebb800a6489136ee9b1 Reviewed-on: https://go-review.googlesource.com/18280Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Adam Langley authored
SEC-1 says: “The component privateKey is the private key defined to be the octet string of length ⌊log₂(n)/8⌋ (where n is the order of the curve)”. Previously the code for parsing ECC private keys would panic (on non-amd64) when the private was too long. It would also pass a too-short private key to crypto/elliptic, possibly resulting in undesirable behaviour. This change makes the parsing function handle both too much and too little padding because GnuTLS does the former and OpenSSL did the latter until 30cd4ff294252c4b6a4b69cbef6a5b4117705d22. It also causes serialisation to pad private keys correctly. Fixes #13699 Change-Id: If9c2faeaeb45af8a4d7770d784f3d2633e7f8290 Reviewed-on: https://go-review.googlesource.com/18094 Run-TryBot: Adam Langley <agl@golang.org> Reviewed-by: Adam Langley <agl@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
Kevin Vu authored
Also add relevant test. Fixes #13343. Change-Id: Ib1e65af1d643d501de89adee3618eddbf6c69c9e Reviewed-on: https://go-review.googlesource.com/18159Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tamir Duberstein authored
Change-Id: I45b026f4b4bf23b222a81669280cbe245048022b Reviewed-on: https://go-review.googlesource.com/18212Reviewed-by: Russ Cox <rsc@golang.org>
-
Michael Hudson-Doyle authored
Before golang.org/cl/13921, "go install -buildmode=shared prefix/..." created a file called "libprefix.so", which was obviously a problem when prefix was something like "." or "../". However, now it expands the ... into all the matched packages, joins them with -, which can clearly be a very long name indeed. Because I plan to build shared libraries for Ubuntu by running commands exactly like "go install -buildmode=shared prefix/...", this special cases this to produce the old behaviour (but de-relativises prefix first). Fixes #13714 Change-Id: I4fd8d4934279f9a18cc70a13e4ef3e23f6abcb6e Reviewed-on: https://go-review.googlesource.com/18114Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Benjamin authored
parseBase128Int compares |shifted| with four, seemingly to ensure the result fits in an int32 on 32-bit platforms where int is 32-bit. However, there is an off-by-one in this logic, so it actually allows five shifts, making the maximum tag number or OID component 2^35-1. Fix this so the maximum is 2^28-1 which should be plenty for OID components and tag numbers while not overflowing on 32-bit platforms. Change-Id: If825b30cc53a0fc08e68ea1a24d265e7eb1a13a4 Reviewed-on: https://go-review.googlesource.com/18225Reviewed-by: Adam Langley <agl@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
-
- 05 Jan, 2016 7 commits
-
-
Brad Fitzpatrick authored
These are the easy, automated cases. There were some more where we need to fight Gerrit and the CLA system to extract the appropriate metadata. Updates #12042 Change-Id: Id63ae635ee7efeec4cd372c7d85bb5b1f557951b Reviewed-on: https://go-review.googlesource.com/18264Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Try to reduce feature request bug reports. Change-Id: I713bb715d25d23e084b054aea8e1c3197dde90d4 Reviewed-on: https://go-review.googlesource.com/18222Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
In the beginning, there was no way to cancel an HTTP request. We later added Transport.CancelRequest to cancel an in-flight HTTP request by breaking its underlying TCP connection, but it was hard to use correctly and didn't work in all cases. And its error messages were terrible. Some of those issues were fixed over time, but the most unfixable problem was that it didn't compose well. All RoundTripper implementations had to choose to whether to implement CancelRequest and both decisions had negative consequences. In Go 1.5 we added Request.Cancel, which composed well, worked in all phases, had nice error messages, etc. But we forgot to use it in the implementation of Client.Timeout (a timeout which spans multiple requests and reading request bodies). In Go 1.6 (upcoming), we added HTTP/2 support, but now Client.Timeout didn't work because the http2.Transport didn't have a CancelRequest method. Rather than add a CancelRequest method to http2, officially deprecate it and update the only caller (Client, for Client.Cancel) to use Request.Cancel instead. The http2 Client timeout tests are enabled now. For compatibility, we still use CancelRequest in Client if we don't recognize the RoundTripper type. But documentation has been updated to tell people that CancelRequest is deprecated. Fixes #13540 Change-Id: I15546b90825bb8b54905e17563eca55ea2642075 Reviewed-on: https://go-review.googlesource.com/18260Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Slightly rephrased sentence to emphasize the contents of the Unicode categories w/o repeating the full category name each time. Fixes #13414. Change-Id: Icd32ff1547fa81e866c5937a631c3344bb6087c6 Reviewed-on: https://go-review.googlesource.com/18265Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
In debugging the flaky test in #13825, I discovered that my previous change to tighten and simplify the communication protocol between Transport.roundTrip and persistConn.readLoop in https://golang.org/cl/17890 wasn't complete. This change simplifies it further: the buffered-vs-unbuffered complexity goes away, and we no longer need to re-try channel reads in the select case. It was trying to prioritize channels in the case that two were readable in the select. (it was only failing in the race builder because the race builds randomize select scheduling) The problem was that in the bodyless response case we had to return the idle connection before replying to roundTrip. But putIdleConn previously both added it to the free list (which we wanted), but also closed the connection, which made the caller goroutine (Transport.roundTrip) have two readable cases: pc.closech, and the response. We guarded against similar conditions in the caller's select for two readable channels, but such a fix wasn't possible here, and would be overly complicated. Instead, switch to unbuffered channels. The unbuffered channels were only to prevent goroutine leaks, so address that differently: add a "callerGone" channel closed by the caller on exit, and select on that during any unbuffered sends. As part of the fix, split putIdleConn into two halves: a part that just returns to the freelist, and a part that also closes. Update the four callers to the variants each wanted. Incidentally, the connections were closing on return to the pool due to MaxIdleConnsPerHost (somewhat related: #13801), but this bug could've manifested for plenty of other reasons. Fixes #13825 Change-Id: I6fa7136e2c52909d57a22ea4b74d0155fdf0e6fa Reviewed-on: https://go-review.googlesource.com/18282 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Austin Clements authored
This test triggers a large number of usleep(100)s. linux/arm, openbsd, and solaris have very poor timer resolution on the builders, so usleep(100) actually gives up the whole scheduling quantum. On Linux and OpenBSD (and probably Solaris), profiling signals are only generated when a process completes a whole scheduling quantum, so this test often gets zero profiling signals and fails. Until we figure out what to do about this, skip this test on these platforms. Updates #13405. Change-Id: Ica94e4a8ae7a8df3e5a840504f83ee2ec08727df Reviewed-on: https://go-review.googlesource.com/18252Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
Previously, when a program died because of a SIGHUP, SIGINT, or SIGTERM signal it would exit with status 2. This CL fixes the runtime to exit with a status indicating that the program was killed by a signal. Change-Id: Ic2982a2562857edfdccaf68856e0e4df532af136 Reviewed-on: https://go-review.googlesource.com/18156Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-