This CL revises existing platform-dependent default socket
options to make it possible to accomodate multiple multicast
datagram listeners on a single service port.
Also removes unnecessary SO_REUSEADDR, SO_REUSEPORT socket
options from unicast datagram sockets by default.
Fixes#1692.
R=devon.odell, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5538052
This lets us mark net's cgo_stub.go as only to be
built when cgo is disabled.
R=golang-dev, ality, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5489100
This CL makes both InterfaceAddrs and Addrs method on Interface
return IPNet struct for representing interface address and mask
like below:
interface "lo0": flags "up|loopback|multicast", ifindex 1, mtu 16384
interface address "fe80::1/64"
interface address "127.0.0.1/8"
interface address "::1/128"
joined group address "ff02::fb"
joined group address "224.0.0.251"
joined group address "ff02::2:65d0:d71e"
joined group address "224.0.0.1"
joined group address "ff01::1"
joined group address "ff02::1"
joined group address "ff02::1:ff00:1"
Fixes#2571.
R=rsc
CC=golang-dev
https://golang.org/cl/5489062
- no empty lines inside empty structs and interfaces
- top-level declarations are separated by a blank line if
a) they are of different kind (e.g. const vs type); or
b) there are documentation comments associated with a
declaration (this is new)
- applied gofmt -w misc src
The actual changes are in go/printer/nodes.go:397-400 (empty structs/interfaces),
and go/printer/printer.go:307-309 (extra line break). The remaining
changes are cleanups w/o changing the existing functionality.
Fixes issue 2570.
R=rsc
CC=golang-dev
https://golang.org/cl/5493057
We only want to attempt to un-gzip if there's a body (not in
response to a HEAD)
This was accidentally passing before, but revealed to be broken
when c3c6e72d7cc went in.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5477093
The obvious fix is breaking the build in non-obvious ways.
Reverting while waiting for the correct fix, if any is needed.
««« original CL description
net/http: fix bug in error checking
Thanks to josef86@gmail.com for pointing this out.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5477092
»»»
R=iant
CC=golang-dev
https://golang.org/cl/5488085
breaks build
««« original CL description
http: close connection after printing panic stack trace
In a testing situation, it's possible for a local http
server to panic and the test exit without the stack trace
ever being printed.
Fixes#2480.
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5414048
»»»
R=bradfitz
CC=golang-dev
https://golang.org/cl/5482061
In a testing situation, it's possible for a local http
server to panic and the test exit without the stack trace
ever being printed.
Fixes#2480.
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5414048
It was fragile and non-portable, and then became spammy with
the os.EINVAL removal. Now it just uses the length of the
Peek return value instead.
R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5453065
All but 3 cases (in gcimporter.go and hixie.go)
are automatic conversions using gofix.
No attempt is made to use the new Append functions
even though there are definitely opportunities.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5447069
For now a pair of socket options SOL_SOCKET and SO_BINDTODEVICE
is supported on Linux only. I'd like to demote BindToDevice API
to syscall level because it's Linux dependent one.
In the near future, probably we may have a bit more portable
API that using IPROTO_IP/IPV6 level socket options to specify,
identify an inbound, outbound IP interface on incoming, outgoing
UDP and raw IP packets.
R=cw, golang-dev
CC=golang-dev
https://golang.org/cl/5447071
The allowed conversions before and after are:
type Tstring string
type Tbyte []byte
type Trune []rune
string <-> string // ok
string <-> []byte // ok
string <-> []rune // ok
string <-> Tstring // ok
string <-> Tbyte // was illegal, now ok
string <-> Trune // was illegal, now ok
Tstring <-> string // ok
Tstring <-> []byte // ok
Tstring <-> []rune // ok
Tstring <-> Tstring // ok
Tstring <-> Tbyte // was illegal, now ok
Tstring <-> Trune // was illegal, now ok
Update spec, compiler, tests. Use in a few packages.
We agreed on this a few months ago but never implemented it.
Fixes#1707.
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5421057