summaryrefslogtreecommitdiff
path: root/src/pkg/net
Commit message (Collapse)AuthorAgeFilesLines
* [release-branch.go1.2] net/http/httputil: fix DumpRequestOut with ↵Andrew Gerrand2013-11-012-3/+55
| | | | | | | | | | | | | | | | | | ContentLength & false body param ??? CL 14920050 / 5ed8c82778ae net/http/httputil: fix DumpRequestOut with ContentLength & false body param Fixes issue 6471 R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/14920050 ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/20590044
* [release-branch.go1.2] net: handle single-line non-\n-terminated files ↵Andrew Gerrand2013-11-013-1/+15
| | | | | | | | | | | | | | | | | | | | correctly in readLine ??? CL 15960047 / a0d4544cdb2a net: handle single-line non-\n-terminated files correctly in readLine Fixes issue 6646. R=rsc, bradfitz CC=golang-dev https://codereview.appspot.com/15960047 Committer: Russ Cox <rsc@golang.org> ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/20560044
* [release-branch.go1.2] net/url: fix Encode doc commentAndrew Gerrand2013-11-011-2/+2
| | | | | | | | | | | | | | | | ??? CL 16430043 / f9af8b83c78c net/url: fix Encode doc comment Encoded query strings are always sorted by key; the example wasn't. R=golang-dev, dsymonds, minux.ma, bradfitz CC=golang-dev https://codereview.appspot.com/16430043 ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/20480044
* [release-branch.go1.2] net/mail: fix minor doc typo.Andrew Gerrand2013-11-011-1/+1
| | | | | | | | | | | | | | ??? CL 15510043 / 6752a7aad603 net/mail: fix minor doc typo. R=golang-dev, minux.ma CC=golang-dev https://codereview.appspot.com/15510043 ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/20560043
* [release-branch.go1.2] net: make sure failed Dial returns nil ConnAndrew Gerrand2013-11-012-10/+62
| | | | | | | | | | | | | | | | ??? CL 14950045 / 1e60ffd5933d net: make sure failed Dial returns nil Conn Fixes issue 6614. R=golang-dev, bradfitz, mikioh.mikioh CC=golang-dev https://codereview.appspot.com/14950045 ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/20170047
* net/url: fix regression when serializing relative URLsBrad Fitzpatrick2013-10-172-1/+9
| | | | | | | | | | | Only add a slash to path if it's a separator between a host and path. Fixes issue 6609 R=golang-dev, dsymonds, r CC=golang-dev https://codereview.appspot.com/14815043
* net/http: skip content-type sniffing if the header is explicitly unset.Michael Piatek2013-10-154-10/+34
| | | | | | | | | | Fixes issue 5953 R=dsymonds, bradfitz, rsc CC=golang-dev https://codereview.appspot.com/14434044 Committer: David Symonds <dsymonds@golang.org>
* net: fix TestDialFailPDLeak to work when GOMAXPROCS is largeIan Lance Taylor2013-10-091-2/+3
| | | | | | | | Fixes issue 6553. R=golang-dev, mikioh.mikioh CC=golang-dev https://codereview.appspot.com/14526048
* net: fix typo in failure message in testIan Lance Taylor2013-10-091-1/+1
| | | | | | R=golang-dev, mikioh.mikioh CC=golang-dev https://codereview.appspot.com/14582043
* net: use original argument in lookup errorRuss Cox2013-10-021-0/+6
| | | | | | | | Fixes issue 6324. R=golang-dev, iant, mikioh.mikioh CC=golang-dev https://codereview.appspot.com/13280049
* net/http: be clear that HTTPS is supportedRuss Cox2013-10-021-1/+1
| | | | | | | | Fixes issue 6443. R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/14231045
* all: fix some mistakes found by go tool vet .Rob Pike2013-09-275-5/+5
| | | | | | R=golang-dev, iant, adg CC=golang-dev https://codereview.appspot.com/14000043
* net: re-enable raw socket tests on windowsAlex Brainman2013-09-247-50/+46
| | | | | | | | | | | | | Since CL 38bf89161a72 raw socket tests are not executed on windows builders. This change re-enable them again. It will attempt to run raw socket tests only if user is permitted to create raw socket by OS. Fixes issue 6392 R=golang-dev CC=golang-dev, mikioh.mikioh, rsc https://codereview.appspot.com/13422044
* net: ensure that ResolveTCPAddr(addr.String()) reproduces addrRuss Cox2013-09-239-68/+65
| | | | | | | | | | And same for UDP. Fixes issue 6465. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13740048
* net: fix Close of autobind unix listenerAlbert Strasheim2013-09-232-2/+14
| | | | | | | | | | Fixes issue 6455. R=mikioh.mikioh, rsc CC=golang-dev https://codereview.appspot.com/13457058 Committer: Russ Cox <rsc@golang.org>
* net/http: accept Content-Range for entire fileRuss Cox2013-09-232-1/+8
| | | | | | | | Fixes a bug reported privately. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13846043
* net/http: send correct time in Date header.Dmitry Chestnykh2013-09-223-1/+17
| | | | | | | | | | | | | | | | Date header indicated that it contained GMT time, however it actually sent local time. Fixed by converting time to UTC. Also fixes incorrect comment in appendTime(). Regression since CL 9432046. R=golang-dev, dave, bradfitz CC=golang-dev https://codereview.appspot.com/13386047 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* net/http/cgi: use 'https://' for urls if HTTPS is set.Thomas Habets2013-09-182-12/+39
| | | | | | | | R=golang-dev, adg CC=golang-dev https://codereview.appspot.com/13700044 Committer: Andrew Gerrand <adg@golang.org>
* net: make all.bat run for ordinary Windows usersRuss Cox2013-09-164-0/+16
| | | | | | | | | | | | | | | | | | | This CL is required for all.bat to work out of the box on my Windows 8 laptop. These tests either require the firewall to be turned off or require the user to be in the Administrators group. I don't know which. Alex may follow up with a refinement of the test to allow them to run if the user is in the Administrators group. Fixes issue 6392. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13421049
* net/rpc: log I/O and internal errors only if debugLog is set.Han-Wen Nienhuys2013-09-163-4/+10
| | | | | | | | | | Fixes issue 6367. R=rsc, r CC=golang-dev https://codereview.appspot.com/13395047 Committer: Rob Pike <r@golang.org>
* net/rpc: document thread safety requirements of codec types.Han-Wen Nienhuys2013-09-122-0/+2
| | | | | | | | | | Fixes issue 6306. R=golang-dev, bradfitz, r CC=golang-dev https://codereview.appspot.com/13474043 Committer: Rob Pike <r@golang.org>
* net/http: document ServeMux handling of pattern "/"Brad Fitzpatrick2013-09-122-0/+22
| | | | | | | | Fixes Issue 4799 R=golang-dev, dave, rsc CC=golang-dev https://codereview.appspot.com/13457047
* net: move mock ICMP into separate fileMikio Hara2013-09-122-110/+116
| | | | | | | | This is in prepartion for fixing issue 6320. R=golang-dev, dave CC=golang-dev https://codereview.appspot.com/13611043
* net: make TestDialFailPDLeak shorterMikio Hara2013-09-121-7/+20
| | | | | | | | | | | | Reduces a number of trials but it still can detect memory leak when we make blunders in runtime-integarted network poller work, like just forgetting to call runtime_pollClose in code paths. Also disables the test on windows/386. R=alex.brainman, r CC=golang-dev https://codereview.appspot.com/13022046
* undo CL 13348045 / 43675523c526Russ Cox2013-09-111-7/+5
| | | | | | | | | | | | | | | | | | There is no reason to do this, and it's more work. ??? original CL description net: make channel-based semaphore depend on receive, not send R=r, dvyukov CC=golang-dev https://codereview.appspot.com/13348045 Committer: Rob Pike <r@golang.org> ??? R=golang-dev, r CC=golang-dev https://codereview.appspot.com/13632047
* net/http: explain the "1.1" in the default User-AgentRuss Cox2013-09-111-0/+5
| | | | | | R=golang-dev, adg CC=golang-dev https://codereview.appspot.com/13263052
* net: defend against broken getaddrinfo on LinuxRuss Cox2013-09-111-0/+10
| | | | | | | | | | | getaddrinfo is supposed to set errno when it returns EAI_SYSTEM, but sometimes it does not. Fixes issue 6232. R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/13532045
* net: implement TCP connection setup with fast failoverMikio Hara2013-09-118-63/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds minimal support of Happy Eyeballs-like TCP connection setup to Dialer API. Happy Eyeballs and derivation techniques are described in the following: - Happy Eyeballs: Success with Dual-Stack Hosts http://tools.ietf.org/html/rfc6555 - Analysing Dual Stack Behaviour and IPv6 Quality http://www.potaroo.net/presentations/2012-04-17-dual-stack-quality.pdf Usually, the techniques consist of three components below. - DNS query racers, that run A and AAAA queries in parallel or series - A short list of destination addresses - TCP SYN racers, that run IPv4 and IPv6 transport in parallel or series This CL implements only the latter two. The existing DNS query component gathers together A and AAAA records in series, so we don't touch it here. This CL just uses extended resolveInternetAddr and makes it possible to run multiple Dial racers in parallel. For example, when the given destination is a DNS name and the name has multiple address family A and AAAA records, and it happens on the TCP wildcard network "tcp" with DualStack=true like the following: (&net.Dialer{DualStack: true}).Dial("tcp", "www.example.com:80") The function will return a first established connection either TCP over IPv4 or TCP over IPv6, and close the other connection internally. Fixes issue 3610. Fixes issue 5267. Benchmark results on freebsd/amd64 virtual machine, tip vs. tip+12416043: benchmark old ns/op new ns/op delta BenchmarkTCP4OneShot 50696 52141 +2.85% BenchmarkTCP4OneShotTimeout 65775 66426 +0.99% BenchmarkTCP4Persistent 10986 10457 -4.82% BenchmarkTCP4PersistentTimeout 11207 10445 -6.80% BenchmarkTCP6OneShot 62009 63718 +2.76% BenchmarkTCP6OneShotTimeout 78351 79138 +1.00% BenchmarkTCP6Persistent 14695 14659 -0.24% BenchmarkTCP6PersistentTimeout 15032 14646 -2.57% BenchmarkTCP4ConcurrentReadWrite 7215 6217 -13.83% BenchmarkTCP6ConcurrentReadWrite 7528 7493 -0.46% benchmark old allocs new allocs delta BenchmarkTCP4OneShot 36 36 0.00% BenchmarkTCP4OneShotTimeout 36 36 0.00% BenchmarkTCP4Persistent 0 0 n/a% BenchmarkTCP4PersistentTimeout 0 0 n/a% BenchmarkTCP6OneShot 37 37 0.00% BenchmarkTCP6OneShotTimeout 37 37 0.00% BenchmarkTCP6Persistent 0 0 n/a% BenchmarkTCP6PersistentTimeout 0 0 n/a% BenchmarkTCP4ConcurrentReadWrite 0 0 n/a% BenchmarkTCP6ConcurrentReadWrite 0 0 n/a% benchmark old bytes new bytes delta BenchmarkTCP4OneShot 2500 2503 0.12% BenchmarkTCP4OneShotTimeout 2508 2505 -0.12% BenchmarkTCP4Persistent 0 0 n/a% BenchmarkTCP4PersistentTimeout 0 0 n/a% BenchmarkTCP6OneShot 2713 2707 -0.22% BenchmarkTCP6OneShotTimeout 2722 2720 -0.07% BenchmarkTCP6Persistent 0 0 n/a% BenchmarkTCP6PersistentTimeout 0 0 n/a% BenchmarkTCP4ConcurrentReadWrite 0 0 n/a% BenchmarkTCP6ConcurrentReadWrite 0 0 n/a% R=golang-dev, bradfitz, nightlyone, rsc CC=golang-dev https://codereview.appspot.com/12416043 Committer: Russ Cox <rsc@golang.org>
* net: remove dreg of obsoleted network pollerMikio Hara2013-09-102-91/+0
| | | | | | R=golang-dev, dave CC=golang-dev https://codereview.appspot.com/13396051
* net: don't error when marshalling nil IP addressesBrad Fitzpatrick2013-09-062-11/+35
| | | | | | | | | | See https://code.google.com/p/go/issues/detail?id=6339#c3 Fixes Issue 6339 R=golang-dev, rsc CC=golang-dev https://codereview.appspot.com/13553044
* net: Fix inaccurate docs for AcceptTCP and AcceptUnix.Kamil Kisiel2013-09-064-4/+4
| | | | | | | | R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13592043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* net/http: remove dreg of obsoleted network pollerMikio Hara2013-09-041-1/+0
| | | | | | R=golang-dev, r CC=golang-dev https://codereview.appspot.com/13261049
* net/http: sniff lessBrad Fitzpatrick2013-09-031-3/+2
| | | | | | | | | | We were reading 1024 bytes but only using 512. Fixes issue 6311 R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/13289047
* net: fix TestFirstFavoriteAddr failure on single IP stack kernelMikio Hara2013-09-021-0/+4
| | | | | | | | | | Update issue 3610 Update issue 5267 Update issue 5707 R=golang-dev, bradfitz, dave CC=golang-dev https://codereview.appspot.com/13465043
* net: keep lookup IP stuff closeMikio Hara2013-08-311-15/+13
| | | | | | | | Also flattens import declaration. R=golang-dev, alex.brainman CC=golang-dev https://codereview.appspot.com/13373046
* net: make resolveInternetAddr return a list of addressesMikio Hara2013-08-317-62/+317
| | | | | | | | | | | | | | | | | | This CL makes resolveInternetAddr return a list of addresses that contain a pair of different address family IP addresses if possible, but doesn't contain any API behavioral changes yet. A simple IP address selection mechanism for Resolve{TCP,UDP,IP}Addr and Dial API still prefers IPv4. This is in preparation for TCP connection setup with fast failover on dual IP stack node as described in RFC 6555. Update issue 3610 Update issue 5267 R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13374043
* net: add addrListMikio Hara2013-08-301-0/+18
| | | | | | | | | | | | | | | This CL adds a new type addrList that will carry a short list of IP addresses to dial helper functions in the upcoming CLs. This is in preparation for TCP connection setup with fast failover on dual IP stack node as described in RFC 6555. Update issue 3610 Update issue 5267 R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13241046
* net: add netaddr interfaceMikio Hara2013-08-3014-73/+85
| | | | | | | | | | | | | | | | This CL adds the netaddr interface that will carry a single network endpoint address or a short list of IP addresses to dial helper functions in the upcoming CLs. This is in preparation for TCP connection setup with fast failover on dual IP stack node as described in RFC 6555. Update issue 3610 Update issue 5267 R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/13368044
* net/http: redirect handlers from mux.Handler() shouldn't clear the query stringShenghou Ma2013-08-292-1/+74
| | | | | | | | R=bradfitz, alberto.garcia.hierro, rsc, adg CC=golang-dev https://codereview.appspot.com/7099045 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* net: make channel-based semaphore depend on receive, not sendRobert Daniel Kortschak2013-08-291-2/+8
| | | | | | | | R=r, dvyukov CC=golang-dev https://codereview.appspot.com/13348045 Committer: Rob Pike <r@golang.org>
* net: make protocol-specific Dial and Listen return consistent error valueMikio Hara2013-08-285-52/+33
| | | | | | | | Update issue 4856 R=golang-dev, bradfitz, dave CC=golang-dev https://codereview.appspot.com/12916046
* net: BUG section for ReadFrom, ReadFromIP methods of IPConn on "ip4" networkMikio Hara2013-08-282-1/+13
| | | | | | | | Fixes issue 3944. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/13263043
* net/http: document Request.Body moreBrad Fitzpatrick2013-08-271-1/+10
| | | | | | | | Fixes issue 6221 R=golang-dev, r CC=golang-dev https://codereview.appspot.com/13289043
* net/smtp: clarify that SendMail's auth param is optionalBrad Fitzpatrick2013-08-271-3/+4
| | | | | | | | It wasn't obvious that the Auth could be nil. R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/13060048
* net: have separate read and write processing threads on windowsAlex Brainman2013-08-276-21/+18
| | | | | | | | Fixes issue 4195 R=golang-dev, mikioh.mikioh CC=golang-dev https://codereview.appspot.com/12960046
* net: enable PacketConn test for raw IP network on WindowsMikio Hara2013-08-261-59/+53
| | | | | | | | | | | Just forgot to include this in CL 12843043. Also consolidates the code dealing with test environment. Update issue 6122 R=alex.brainman CC=golang-dev https://codereview.appspot.com/13184043
* net/http: do not send leading dot in cookie domain attributeVolker Dobler2013-08-262-3/+8
| | | | | | | | | | | | RFC 6265 allows a leading dot in a cookie domain attribute but is clear (see section 4.1.1) that a Set-Cookie header should be sent without these dots. R=bradfitz CC=golang-dev https://codereview.appspot.com/13111043 Committer: Brad Fitzpatrick <bradfitz@golang.org>
* syscall: update routing socket parser for NetBSD 6 and beyondMikio Hara2013-08-251-4/+4
| | | | | | | | | | | NetBSD 6 kernel and beyond require 64-bit aligned access to routing facilities. Fixes issue 6226. R=golang-dev, bsiegert, bradfitz CC=golang-dev https://codereview.appspot.com/13170043
* net: allow TestDialFailPDLeak run in long-mode testMikio Hara2013-08-241-4/+2
| | | | | | R=golang-dev, dave CC=golang-dev https://codereview.appspot.com/12917050
* net: dragonfly supportJoel Sing2013-08-2434-32/+147
| | | | | | | | Make the net package build and work on dragonfly. R=bradfitz CC=golang-dev https://codereview.appspot.com/13173044