- 17 Oct, 2015 2 commits
-
-
Yasuharu Goto authored
Current http client doesn't support Expect: 100-continue request header(RFC2616-8/RFC7231-5.1.1). So even if the client have the header, the head of the request body is consumed prematurely. Those are my intentions to avoid premature consuming body in this change. - If http.Request header contains body and Expect: 100-continue header, it blocks sending body until it gets the first response. - If the first status code to the request were 100, the request starts sending body. Otherwise, sending body will be cancelled. - Tranport.ExpectContinueTimeout specifies the amount of the time to wait for the first response. Fixes #3665 Change-Id: I4c04f7d88573b08cabd146c4e822061764a7cd1f Reviewed-on: https://go-review.googlesource.com/10091 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Change-Id: Ie9ea4af4315a4d0eb69d0569726bb3eca2b397af Reviewed-on: https://go-review.googlesource.com/16005Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 16 Oct, 2015 9 commits
-
-
Brad Fitzpatrick authored
Fixes #7782 Fixes #9554 Updates #7237 (original metabug, before we switched to specific bugs) Updates #11932 (plan9 still doesn't have net I/O deadline support) Change-Id: I96f311b88b1501d884ebc008fd31ad2cf1e16d75 Reviewed-on: https://go-review.googlesource.com/15941Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David du Colombier <0intro@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
In net/parse.go we reimplement bytes.IndexByte and strings.IndexByte, However those are implemented in runtime/$GOARCH_asm.s. Using versions from runtime should provide performance advantage, and keep the same code together. Change-Id: I6212184bdf6aa1f2c03ce26d4b63f5b379d8ed0c Reviewed-on: https://go-review.googlesource.com/15953 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Nodir Turakulov authored
A TODO to merge is removed from panic1.go. The rest is appended to panic.go Updates #12952 Change-Id: Ied4382a455abc20bc2938e34d031802e6b4baf8b Reviewed-on: https://go-review.googlesource.com/15905Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Nodir Turakulov authored
It seems that it was called print1.go mistakenly: print.go was deleted in the same commit: https://go.googlesource.com/go/+/597b266eafe7d63e9be8da1c1b4813bd2998a11c Updates #12952 Change-Id: I371e59d6cebc8824857df3f3ee89101147dfffc0 Reviewed-on: https://go-review.googlesource.com/15950Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Nodir Turakulov authored
string1.go contents are appended to string.go as is Updates #12952 Change-Id: I30083ba7fdd362d4421e964a494c76ca865bedc2 Reviewed-on: https://go-review.googlesource.com/15951Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Chris Hines authored
Previously with db.maxOpen > 0, db.maxOpen+n failed connection attempts started concurrently could result in a deadlock. DB.conn and DB.openNewConnection did not trigger the DB.connectionOpener go routine after a failed connection attempt. This omission could leave go routines waiting for DB.connectionOpener forever. In addition the logic to track the state of the pool was inconsistent. db.numOpen was sometimes incremented optimistically and sometimes not. This change harmonizes the logic and eliminates the db.pendingOpens variable, making the logic easier to understand and maintain. Fixes #10886 Change-Id: I983c4921a3dacfbd531c3d7f8d2da8a592e9922a Reviewed-on: https://go-review.googlesource.com/14547Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I3ba6e97089ef6e69ba31dfb632df465859906a74 Reviewed-on: https://go-review.googlesource.com/15940 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Change-Id: I88f80f5914d6e4c179f3d28aa59fc29b7ef0cc66 Reviewed-on: https://go-review.googlesource.com/15960Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
os/signal depends on a few unexported runtime functions. This removes the assembly stubs it used to get access to these in favour of using //go:linkname in runtime to make the functions accessible to os/signal. This is motivated by ppc64le shared libraries, where you cannot BR to a symbol defined in a shared library (only BL), but it seems like an improvment anyway. Change-Id: I09361203ce38070bd3f132f6dc5ac212f2dc6f58 Reviewed-on: https://go-review.googlesource.com/15871 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 15 Oct, 2015 6 commits
-
-
Matthew Dempsky authored
This isn't C anymore. No binary change to pkg/linux_amd64/runtime.a. Change-Id: I24d66b0f5ac888f432b874aac684b1395e7c8345 Reviewed-on: https://go-review.googlesource.com/15903Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Apply static bounds checking logic during type checking even to zero-element arrays, but skip synthesized OINDEX nodes that the compiler has asserted are within bounds (such as the ones generated while desugaring ORANGE nodes). This matches the logic in walkexpr that also skips static bounds checking when Bounded is true. Passes toolstash/buildall. Fixes #12944. Change-Id: I14ba03d71c002bf969d69783bec8d1a8e10e7d75 Reviewed-on: https://go-review.googlesource.com/15902Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
No functional change and passes toolstash/buildall, but eliminates a 13-deep nesting of if statements. Change-Id: I32e63dcf358c6eb521935f4ee07fbe749278e5ef Reviewed-on: https://go-review.googlesource.com/15901Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I0255f24f5c5925ea4daa28a28d23606df35d4373 Reviewed-on: https://go-review.googlesource.com/15824Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Nodir Turakulov authored
Read what a non-empty interface points to. The deleted lines were added in https://codereview.appspot.com/4810060/, which attempted to break an infinite loop. That was a long time ago. If I just delete these lines with current codebase, the test "bug1" (added in that CL) does not fail. All new tests fail without this fix. Fixes #12924 Change-Id: I9370ca44facd6af3019850aa065b936e5a482d37 Reviewed-on: https://go-review.googlesource.com/15809Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Alexandre Cesaro authored
As specified by RFC 2047 section 2, encoded-words may not be more than 75 characters long. We only enforce this rule when the charset is UTF-8, since multi-bytes characters must not be split accross encoded-words (see section 5.3). Fixes #12300 Change-Id: I72a43fc3fe6ddeb3dab54dcdce0837d7ebf658f0 Reviewed-on: https://go-review.googlesource.com/14957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Oct, 2015 9 commits
-
-
Aaron Jacobs authored
The clues to this were already there, but as a user I was still unsure. Make this more explicit. Change-Id: I68564f3498dcd4897772a303588f03a6b65f111d Reviewed-on: https://go-review.googlesource.com/15172Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Nodir Turakulov authored
As correctly mentioned in #11883, encodeState.string and encodeState.stringBytes never return an error. This CL removes the error from the function signatures and somewhat simplifies call sites. Fixes #11883 Change-Id: I1d1853d09631c545b68b5eea86ff7daa2e0ca10b Reviewed-on: https://go-review.googlesource.com/15836 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
This enables HTTP/2 by default (for https only) if the user didn't configure anything in their NPN/ALPN map. If they're using SPDY or an alternate http2 or a newer http2 from x/net/http2, we do nothing and don't use the standard library's vendored copy of x/net/http2. Upstream remains golang.org/x/net/http2. Update #6891 Change-Id: I69a8957a021a00ac353f9d7fdb9a40a5b69f2199 Reviewed-on: https://go-review.googlesource.com/15828 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
golang.org/x/net/http2 becomes net/http/h2_bundle.go (using adonovan's x/tools/cmd/bundle tool), becoming a hidden part of the net/http package. golang.org/x/net/http2/hpack becomes vendor/golang.org/x/net/http2/hpack. At git rev 7331ef52 (https://go-review.googlesource.com/15821) Change-Id: Ia6683e6f91a481b11a778638bf65b6a338744eea Reviewed-on: https://go-review.googlesource.com/15822Reviewed-by: Andrew Gerrand <adg@golang.org>
-
David Glasser authored
The PROXY protocol is supported by several proxy servers such as haproxy and Amazon ELB. This protocol allows services running behind a proxy to learn the remote address of the actual client connecting to the proxy, by including a single textual line at the beginning of the TCP connection. http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt There are several Go libraries for this protocol (such as https://github.com/armon/go-proxyproto), which operate by wrapping a net.Conn with an implementation whose RemoteAddr method reads the protocol line before returning. This means that RemoteAddr is a blocking call. Before this change, http.Serve called RemoteAddr from the main Accepting goroutine, not from the per-connection goroutine. This meant that it would not Accept another connection until RemoteAddr returned, which is not appropriate if RemoteAddr needs to do a blocking read from the socket first. Fixes #12943. Change-Id: I1a242169e6e4aafd118b794e7c8ac45d0d573421 Reviewed-on: https://go-review.googlesource.com/15835Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Joe Tsai authored
Change-Id: I2ac6b178e666e34e028001078faf62ce71e12e9d Reviewed-on: https://go-review.googlesource.com/15834Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Steven Hartland authored
Allow all CGI environment settings from the inherited set and default inherited set to be overridden including PATH by Env. Change-Id: Ief8d33247b879fa87a8bfd6416d4813116db98de Reviewed-on: https://go-review.googlesource.com/14959Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Raul Silvera authored
The current fastlog2 testing checks all 64M values in the domain of interest, which is too much for platforms with no native floating point. Reduce testing under testing.Short() to speed up builds for those platforms. Related to #12620 Change-Id: Ie5dcd408724ba91c3b3fcf9ba0dddedb34706cd1 Reviewed-on: https://go-review.googlesource.com/15830Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Joel Sing <jsing@google.com> Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Katrina Owen authored
The documentation listing err == EOF can be confusing to newcomers to the language who are looking for the relevant documentation for that error. Change-Id: I301885950d0e1d0fbdf3a1892fca86eac7a0c616 Reviewed-on: https://go-review.googlesource.com/15806Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 13 Oct, 2015 5 commits
-
-
Shenghou Ma authored
Due to #9401, trailing empty fields will occupy at least 1 byte of space. Fixes #12884. Change-Id: I838d3f1a73637e526f5a6dbc348981227d5bb2fd Reviewed-on: https://go-review.googlesource.com/15660 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Hyang-Ah Hana Kim authored
Also, handle the case where 'read' returns EINVAL instead of EBADF when the descriptor is not ready. (android 4.4.4/cyanogenmod, nexus7) Change-Id: I56c5949d27303d44a4fd0de38951b85e20cef167 Reviewed-on: https://go-review.googlesource.com/15810Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Fixes these warnings from go vet: buildid_linux.go:25: no formatting directive in Fatalf call callback.go:180: arg pc[i] for printf verb %p of wrong type: uintptr env.go:34: possible misuse of unsafe.Pointer issue7665.go:22: possible misuse of unsafe.Pointer Change-Id: I83811b9c10c617139713a626b4a34ab05564d4fe Reviewed-on: https://go-review.googlesource.com/15802Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Brad Fitzpatrick authored
Fixes #12785 Change-Id: Iae4383889298c6a78b1ba41bd2cda70b0758fcba Reviewed-on: https://go-review.googlesource.com/15737Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
The duplication of _Kind and kind constants is a legacy of the conversion from C. Change-Id: I368b35a41f215cf91ac4b09dac59699edb414a0e Reviewed-on: https://go-review.googlesource.com/15800Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 12 Oct, 2015 4 commits
-
-
Burcu Dogan authored
There is no easy way to understand what user intent was and whether they wanted to use a dynamic import or not. If we skip logging such errors, it breaks common use cases such as https://golang.org/issue/12810. It's a better approach to expose the underlying mechanism and be more verbose with the error messages. Fixes #12810. Change-Id: I7e922c9e848382690d9d9b006d7046e6cf93223b Reviewed-on: https://go-review.googlesource.com/15756Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Burcu Dogan authored
Fixes #12907. Change-Id: I5925852fe6962d4ec7dbb3ea5323e8ddfaf9d576 Reviewed-on: https://go-review.googlesource.com/15755Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I536d55f784bb042a2dee94b2878aff42bc182eed Reviewed-on: https://go-review.googlesource.com/15734Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
These were proposed in the RFC over three years ago, then proposed to be added to Go in https://codereview.appspot.com/7678043/ 2 years and 7 months ago, and the spec hasn't been updated or retracted the whole time. Time to export them. Of note, HTTP/2 uses code 431 (Request Header Fields Too Large). Updates #12843 Change-Id: I78c2fed5fab9540a98e845ace73f21c430a48809 Reviewed-on: https://go-review.googlesource.com/15732Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 11 Oct, 2015 2 commits
-
-
Didier Spezia authored
A MIME header can include values defined on several lines. Only the first line of each value was trimmed. Make sure all the lines are trimmed before being aggregated. Fixes #11204 Change-Id: Id92f384044bc6c4ca836e5dba2081fe82c82dc85 Reviewed-on: https://go-review.googlesource.com/15683Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nigel Tao authored
Fixes #12722 Change-Id: I6a630d8b072ef2b1c63de941743148f8c96b8e5f Reviewed-on: https://go-review.googlesource.com/15671Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Oct, 2015 3 commits
-
-
Brad Fitzpatrick authored
Fixes #12674 Change-Id: I82f53026dd2fc27bd7999d43c27932d683d92af6 Reviewed-on: https://go-review.googlesource.com/15730Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Change-Id: I34c8ada1f3c5d401944483df424011fa2ae9fc3d Reviewed-on: https://go-review.googlesource.com/15673Reviewed-by: Dave Cheney <dave@cheney.net>
-
Dave Cheney authored
Fixes #12866 net/http.Client returns some errors wrapped in a *url.Error. To avoid the requirement to unwrap these errors to determine if the cause was temporary or a timeout, make *url.Error implement net.Error directly. Change-Id: I1ba84ecc7ad5147a40f056ff1254e60290152408 Reviewed-on: https://go-review.googlesource.com/15672Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-