1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:24:41 -07:00
go/src/net
Joshua Rubin a4d03a9bf7 net/http: fix minor leak in Header.WriteSubset
Header.WriteSubset uses a sync.Pool but wouldn't Put the sorter back in
the pool if there was an error writing to the io.Writer

I'm not really sure why the sorter is returned to begin with. The
comment says "for possible return to headerSorterCache".

This also doesn't address potential panics that might occur, but the
overhead of doing the Put in a defer would likely be too great.

Change-Id: If3c45a4c3e11f6ec65d187e25b63455b0142d4e3
Reviewed-on: https://go-review.googlesource.com/73910
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
2017-10-27 19:33:14 +00:00
..
http net/http: fix minor leak in Header.WriteSubset 2017-10-27 19:33:14 +00:00
internal/socktest all: remove unnecessary ", _" from map reads 2017-04-18 15:29:10 +00:00
mail all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
rpc all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
smtp net/smtp: fix spelling mistake 2017-10-26 16:47:59 +00:00
testdata net: use libresolv rules for ndots range and validation 2016-08-17 15:20:24 +00:00
textproto net: document that Header.Get key is case insensitive 2016-11-28 18:37:05 +00:00
url all: revert "all: prefer strings.LastIndexByte over strings.LastIndex" 2017-10-05 23:19:42 +00:00
addrselect_test.go net: disable RFC 6724 Rule 9 for IPv4 addresses 2017-01-06 20:55:48 +00:00
addrselect.go net: disable RFC 6724 Rule 9 for IPv4 addresses 2017-01-06 20:55:48 +00:00
cgo_android.go
cgo_bsd.go
cgo_linux.go
cgo_netbsd.go
cgo_openbsd.go
cgo_resnew.go
cgo_resold.go
cgo_socknew.go
cgo_sockold.go
cgo_solaris.go
cgo_stub.go net: use contexts for cgo-based DNS resolution 2016-05-10 15:55:48 +00:00
cgo_unix_test.go net: use contexts for cgo-based DNS resolution 2016-05-10 15:55:48 +00:00
cgo_unix.go {net,os/user,plugin}: eliminate unnecessary C round-trips 2017-08-17 18:14:16 +00:00
cgo_windows.go
conf_netcgo.go
conf_test.go net: expand nss myhostname fallback detection 2016-11-29 23:11:06 +00:00
conf.go net: expand nss myhostname fallback detection 2016-11-29 23:11:06 +00:00
conn_test.go all: fix copy-and-paste errors in tests 2016-05-06 16:56:19 +00:00
dial_test.go net: increase expected time to dial a closed port on all Darwin ports 2017-10-04 04:55:13 +00:00
dial_unix_test.go net: prevent cancelation goroutine from adjusting fd timeout after connect 2016-08-02 00:55:45 +00:00
dial.go net: update documentation on Listen and ListenPacket 2017-06-22 08:31:13 +00:00
dnsclient_test.go
dnsclient_unix_test.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
dnsclient_unix.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
dnsclient.go net: bring domain name length checks into RFC compliance 2016-11-11 14:56:10 +00:00
dnsconfig_unix_test.go net: bring domain name length checks into RFC compliance 2016-11-11 14:56:10 +00:00
dnsconfig_unix.go net: respect resolv.conf rotate option 2016-09-17 00:34:19 +00:00
dnsmsg_test.go net: change t.Error to t.Errorf 2016-08-16 14:35:55 +00:00
dnsmsg.go all: spell "marshal" and "unmarshal" consistently 2016-11-12 00:13:35 +00:00
dnsname_test.go net: bring domain name length checks into RFC compliance 2016-11-11 14:56:10 +00:00
error_plan9_test.go
error_posix_test.go
error_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
error_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
error_unix_test.go
error_windows_test.go
example_test.go net: update documentation on Listen and ListenPacket 2017-06-22 08:31:13 +00:00
external_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
fd_plan9.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
fd_unix.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
fd_windows.go internal/poll: be explicit when using runtime netpoller 2017-09-26 04:39:19 +00:00
file_plan9.go net: always wake up the readers on close on Plan 9 2016-10-18 13:27:09 +00:00
file_stub.go
file_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
file_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
file_windows.go
file.go net: document unimplemented methods and functions 2016-08-23 14:19:39 +00:00
hook_plan9.go
hook_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
hook_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
hook.go net: context plumbing, add Dialer.DialContext 2016-04-15 22:48:12 +00:00
hosts_test.go
hosts.go
interface_bsd_test.go net: deflake TestPointToPointInterface and TestInterfaceArrivalAndDeparture 2016-05-14 00:53:51 +00:00
interface_bsd.go all: rename vendored golang.org/x/net packages to golang_org 2016-07-13 18:35:40 +00:00
interface_bsdvar.go all: rename vendored golang.org/x/net packages to golang_org 2016-07-13 18:35:40 +00:00
interface_darwin.go all: rename vendored golang.org/x/net packages to golang_org 2016-07-13 18:35:40 +00:00
interface_freebsd.go all: rename vendored golang.org/x/net packages to golang_org 2016-07-13 18:35:40 +00:00
interface_linux_test.go
interface_linux.go net: remove unused Interface parameter 2017-03-07 16:37:07 +00:00
interface_plan9.go net: update doc for unimplemented feature on Plan 9 2016-10-12 13:15:50 +00:00
interface_solaris.go net: implement network interface API for Solaris 2016-10-04 03:04:50 +00:00
interface_stub.go net: implement network interface API for Plan 9 2016-10-12 10:12:31 +00:00
interface_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
interface_unix_test.go net: deflake TestPointToPointInterface and TestInterfaceArrivalAndDeparture 2016-05-14 00:53:51 +00:00
interface_windows_test.go
interface_windows.go net: simplify probeWindowsIPStack 2017-04-28 00:03:30 +00:00
interface.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
ip_test.go net: don't enclose non-literal IPv6 addresses in square brackets 2017-04-14 08:44:22 +00:00
ip.go net: update documentation on IP.IsUnspecified 2017-06-23 00:09:48 +00:00
iprawsock_plan9.go net: context plumbing, add Dialer.DialContext 2016-04-15 22:48:12 +00:00
iprawsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
iprawsock_test.go net: validate network in Dial{,IP} and Listen{Packet,IP} for IP networks 2017-04-14 08:44:45 +00:00
iprawsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
ipsock_plan9.go net: defer file.close() + minor style cleanup 2017-04-26 03:12:20 +00:00
ipsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
ipsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
ipsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
listen_test.go net: fix data race in TestClosingListener 2017-10-13 15:19:59 +00:00
lookup_nacl.go net: make all Resolver methods respect Resolver.PreferGo 2016-10-21 21:10:18 +00:00
lookup_plan9.go net: fix LookupCNAME on Plan 9 2017-08-08 08:00:09 +00:00
lookup_test.go all: revert "all: prefer strings.IndexByte over strings.Index" 2017-10-05 23:19:10 +00:00
lookup_unix.go net: support all PacketConn and Conn returned by Resolver.Dial 2017-06-08 21:53:49 +00:00
lookup_windows_test.go net: make LookupCNAME's native behavior match its cgo behavior 2016-12-20 17:38:29 +00:00
lookup_windows.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
lookup.go net: clarify the length limit for service name 2017-07-06 14:02:46 +00:00
mac_test.go
mac.go
main_cloexec_test.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
main_conf_test.go
main_noconf_test.go
main_plan9_test.go net: don't call forceCloseSockets in non-TestMain functions 2016-05-30 03:30:14 +00:00
main_posix_test.go
main_test.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
main_unix_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
main_windows_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
mockserver_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
net_test.go os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
net_windows_test.go net: fix Windows TestInterfaceHardwareAddrWithGetmac 2017-06-29 15:36:34 +00:00
net.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
netgo_unix_test.go net: add Resolver.StrictErrors 2017-03-09 21:59:00 +00:00
nss_test.go
nss.go
packetconn_test.go
parse_test.go net: remove parsing of negative decimals in IPv4 literal 2016-09-07 17:48:45 +00:00
parse.go net: expand nss myhostname fallback detection 2016-11-29 23:11:06 +00:00
pipe_test.go net: implement deadline functionality on Pipe 2017-10-11 20:00:52 +00:00
pipe.go net: implement deadline functionality on Pipe 2017-10-11 20:00:52 +00:00
platform_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
port_test.go net: fix looking up port numbers starting with numbers. 2016-04-15 23:11:47 +00:00
port_unix.go net: defer file.close() + minor style cleanup 2017-04-26 03:12:20 +00:00
port.go net: fix looking up port numbers starting with numbers. 2016-04-15 23:11:47 +00:00
protoconn_test.go
rawconn_unix_test.go net: make {TCP,Unix}Listener implement syscall.Conn 2017-10-25 20:12:14 +00:00
rawconn_windows_test.go net: make {TCP,Unix}Listener implement syscall.Conn 2017-10-25 20:12:14 +00:00
rawconn.go net: make {TCP,Unix}Listener implement syscall.Conn 2017-10-25 20:12:14 +00:00
sendfile_bsd.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_linux.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_solaris.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sendfile_stub.go
sendfile_test.go
sendfile_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
server_test.go
sock_bsd.go
sock_cloexec.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
sock_linux.go net: simplify internal dtoi and xtoi funcs 2016-08-17 03:12:29 +00:00
sock_plan9.go
sock_posix.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
sock_stub.go
sock_windows.go
sockopt_bsd.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sockopt_solaris.go
sockopt_stub.go
sockopt_windows.go
sockoptip_bsdvar.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_linux.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sockoptip_posix.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_stub.go net, internal/poll: enable ListenMulticastUDP on solaris 2017-08-09 23:52:12 +00:00
sockoptip_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
sys_cloexec.go net, internal/poll, net/internal/socktest: use accept4 and SOCK_{CLOEXEC,NONBLOCK} on dragonfly 2017-04-18 03:56:16 +00:00
tcpsock_plan9.go net: fix close on closed listener on Plan 9 2017-04-26 15:04:43 +00:00
tcpsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
tcpsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
tcpsock_unix_test.go net: handle spurious netpoll wakeups in connect 2017-06-15 22:39:39 +00:00
tcpsock.go net: make {TCP,Unix}Listener implement syscall.Conn 2017-10-25 20:12:14 +00:00
tcpsockopt_darwin.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_dragonfly.go net: use internal/poll for DragonFly setKeepAlivePeriod 2017-02-13 19:25:12 +00:00
tcpsockopt_openbsd.go
tcpsockopt_plan9.go
tcpsockopt_posix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_solaris.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_stub.go
tcpsockopt_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
tcpsockopt_windows.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
timeout_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
udpsock_plan9_test.go net: add multicast UDP support for plan9 2016-10-27 02:15:51 +00:00
udpsock_plan9.go net: add multicast UDP support for plan9 2016-10-27 02:15:51 +00:00
udpsock_posix.go net: make zone helpers into methods of ipv6ZoneCache 2017-04-28 00:03:17 +00:00
udpsock_test.go net: delay IP protocol stack-snooping system calls 2017-04-15 22:22:09 +00:00
udpsock.go net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n 2017-07-06 05:39:42 +00:00
unixsock_linux_test.go net: move some Linux-specific tests to unixsock_linux_test.go file 2017-09-28 03:00:34 +00:00
unixsock_plan9.go net: context plumbing, add Dialer.DialContext 2016-04-15 22:48:12 +00:00
unixsock_posix.go net: fix Dial(":80") on Windows 2016-11-02 19:15:11 +00:00
unixsock_test.go net: move some Linux-specific tests to unixsock_linux_test.go file 2017-09-28 03:00:34 +00:00
unixsock.go net: make {TCP,Unix}Listener implement syscall.Conn 2017-10-25 20:12:14 +00:00
write_unix_test.go runtime: for kqueue treat EVFILT_READ with EV_EOF as permitting a write 2017-10-20 22:26:30 +00:00
writev_test.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00
writev_unix.go net: refactor poller into new internal/poll package 2017-02-13 18:36:28 +00:00