<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/net, branch dev.debug</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>net/http: document that after Hijack, Request.Body is invalid</title>
<updated>2017-07-21T18:55:41+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-07-21T18:52:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=c522b2bec9e6186a8efb7ddd221295390638a18e'/>
<id>c522b2bec9e6186a8efb7ddd221295390638a18e</id>
<content type='text'>
We can make it panic with a more explicit and readable error message
during Go 1.10, but document it for now. This has always been the
case; it's not a new rule.

Updates #20933

Change-Id: I53c1fefb47a8f4aae0bb32fa742afa3a2ed20e8a
Reviewed-on: https://go-review.googlesource.com/50634
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can make it panic with a more explicit and readable error message
during Go 1.10, but document it for now. This has always been the
case; it's not a new rule.

Updates #20933

Change-Id: I53c1fefb47a8f4aae0bb32fa742afa3a2ed20e8a
Reviewed-on: https://go-review.googlesource.com/50634
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/http: improve signature of Redirect, NewRequest</title>
<updated>2017-07-20T20:34:44+00:00</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>shurcooL@gmail.com</email>
</author>
<published>2017-07-19T04:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=2abd8aebc3cae9c5f4e31d6ab963a2ec77f27c7c'/>
<id>2abd8aebc3cae9c5f4e31d6ab963a2ec77f27c7c</id>
<content type='text'>
In CL https://golang.org/cl/4893043 (6 years ago), a new package named
"url" was created (it is currently known as "net/url"). During that
change, some identifier name collisions were introduced, and two
parameters in net/http were renamed to "urlStr".

Since that time, Go has continued to put high emphasis on the quality
and readability of the documentation. Sometimes, that means making small
sacrifices in the implementation details of a package to ensure that
the godoc reads better, since that's what the majority of users interact
with. See https://golang.org/s/style#named-result-parameters:

&gt; Clarity of docs is always more important than saving a line or two
&gt; in your function.

I think the "urlStr" parameter name is suboptimal for godoc purposes,
and just "url" would be better.

During the review of https://golang.org/cl/4893043, it was also noted
by @rsc that having to rename parameters named "url" was suboptimal:

&gt; It's unfortunate that naming the package url means
&gt; you can't have a parameter or variable named url.

However, at the time, the name of the url package was still being
decided, and uri was an alternative name under consideration.
The reason urlStr was chosen is because it was a lesser evil
compared to naming the url package uri instead:

&gt; Let's not get hung up on URI vs. URL, but I'd like s/uri/urlStr/ even for just
&gt; that the "i" in "uri" looks very similar to the "l" in "url" in many fonts.

&gt; Please let's go with urlStr instead of uri.

Now that we have the Go 1 compatibility guarantee, the name of the
net/url package is fixed. However, it's possible to improve the
signature of Redirect, NewRequest functions in net/http package
for godoc purposes by creating a package global alias to url.Parse,
and renaming urlStr parameter to url in the exported funcs. This CL
does so.

Updates #21077.

Change-Id: Ibcc10e3825863a663e6ad91b6eb47b1862a299a6
Reviewed-on: https://go-review.googlesource.com/49930
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In CL https://golang.org/cl/4893043 (6 years ago), a new package named
"url" was created (it is currently known as "net/url"). During that
change, some identifier name collisions were introduced, and two
parameters in net/http were renamed to "urlStr".

Since that time, Go has continued to put high emphasis on the quality
and readability of the documentation. Sometimes, that means making small
sacrifices in the implementation details of a package to ensure that
the godoc reads better, since that's what the majority of users interact
with. See https://golang.org/s/style#named-result-parameters:

&gt; Clarity of docs is always more important than saving a line or two
&gt; in your function.

I think the "urlStr" parameter name is suboptimal for godoc purposes,
and just "url" would be better.

During the review of https://golang.org/cl/4893043, it was also noted
by @rsc that having to rename parameters named "url" was suboptimal:

&gt; It's unfortunate that naming the package url means
&gt; you can't have a parameter or variable named url.

However, at the time, the name of the url package was still being
decided, and uri was an alternative name under consideration.
The reason urlStr was chosen is because it was a lesser evil
compared to naming the url package uri instead:

&gt; Let's not get hung up on URI vs. URL, but I'd like s/uri/urlStr/ even for just
&gt; that the "i" in "uri" looks very similar to the "l" in "url" in many fonts.

&gt; Please let's go with urlStr instead of uri.

Now that we have the Go 1 compatibility guarantee, the name of the
net/url package is fixed. However, it's possible to improve the
signature of Redirect, NewRequest functions in net/http package
for godoc purposes by creating a package global alias to url.Parse,
and renaming urlStr parameter to url in the exported funcs. This CL
does so.

Updates #21077.

Change-Id: Ibcc10e3825863a663e6ad91b6eb47b1862a299a6
Reviewed-on: https://go-review.googlesource.com/49930
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/mail: Fix typo</title>
<updated>2017-07-19T21:51:16+00:00</updated>
<author>
<name>yansal</name>
<email>yannsalaun1@gmail.com</email>
</author>
<published>2017-07-19T21:04:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=3498012e79e7955513c5a39e193a7a4f7a6cf231'/>
<id>3498012e79e7955513c5a39e193a7a4f7a6cf231</id>
<content type='text'>
Fixes #21089

Change-Id: Idd65c7185b3e19f33958eb165cb5b09c06db3d56
Reviewed-on: https://go-review.googlesource.com/50110
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #21089

Change-Id: Idd65c7185b3e19f33958eb165cb5b09c06db3d56
Reviewed-on: https://go-review.googlesource.com/50110
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/http: fix parameter name in comment</title>
<updated>2017-07-18T21:31:15+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2017-07-18T20:29:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=83fb9c8d9f5511f5aca2a0eb9f7507e2527a76a9'/>
<id>83fb9c8d9f5511f5aca2a0eb9f7507e2527a76a9</id>
<content type='text'>
Fixes #21077

Change-Id: Ic61d7313907f58ff4027fd2eee1ddb8c1656304d
Reviewed-on: https://go-review.googlesource.com/49712
Reviewed-by: Dmitri Shuralyov &lt;shurcool@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #21077

Change-Id: Ic61d7313907f58ff4027fd2eee1ddb8c1656304d
Reviewed-on: https://go-review.googlesource.com/49712
Reviewed-by: Dmitri Shuralyov &lt;shurcool@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/http: clarify Handler panic behavior across HTTP versions</title>
<updated>2017-07-14T23:04:10+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-07-14T15:52:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=792f9c9a954c1fab92e5244f18072c4b2df4c301'/>
<id>792f9c9a954c1fab92e5244f18072c4b2df4c301</id>
<content type='text'>
Updates #18997

Change-Id: Ib1961a4c26b42f99b98b255beb7e2a74b632e0c1
Reviewed-on: https://go-review.googlesource.com/48551
Reviewed-by: Joe Shaw &lt;joe@joeshaw.org&gt;
Reviewed-by: Tom Bergan &lt;tombergan@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates #18997

Change-Id: Ib1961a4c26b42f99b98b255beb7e2a74b632e0c1
Reviewed-on: https://go-review.googlesource.com/48551
Reviewed-by: Joe Shaw &lt;joe@joeshaw.org&gt;
Reviewed-by: Tom Bergan &lt;tombergan@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: clarify the length limit for service name</title>
<updated>2017-07-06T14:02:46+00:00</updated>
<author>
<name>Mikio Hara</name>
<email>mikioh.mikioh@gmail.com</email>
</author>
<published>2016-12-14T21:19:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=bb3be403e79731b208c41bd170a6a87642d988da'/>
<id>bb3be403e79731b208c41bd170a6a87642d988da</id>
<content type='text'>
Change-Id: If5495f66d175bdacebd599abf1e064d2343669c2
Reviewed-on: https://go-review.googlesource.com/34430
Run-TryBot: Mikio Hara &lt;mikioh.mikioh@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If5495f66d175bdacebd599abf1e064d2343669c2
Reviewed-on: https://go-review.googlesource.com/34430
Run-TryBot: Mikio Hara &lt;mikioh.mikioh@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: don't return IPv4 unspecified addr for Resolve*Addr of [::] or [::]:n</title>
<updated>2017-07-06T05:39:42+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-07-06T05:00:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a5179bd0a56d8fae91e860f585cef143ce5ec89b'/>
<id>a5179bd0a56d8fae91e860f585cef143ce5ec89b</id>
<content type='text'>
ResolveTCPAddr, ResolveUDPAddr, and ResolveIPAddr return at most one
address. When given a name like "golang.org" to resolve that might
have more than 1 address, the net package has historically preferred
IPv4 addresses, with the assumption that many users don't yet have
IPv6 connectivity and randomly selecting between an IPv4 address and
an IPv6 address at runtime wouldn't be a good experience for IPv4-only
users.

In CL 45088 (78cf0e56) I modified the resolution of the
unspecified/empty address to internally resolve to both IPv6 "::" and
0.0.0.0 to fix issue #18806.

That code has 3 other callers I hadn't considered, though: the
Resolve*Addr functions. Since they preferred IPv4, any Resolve*Addr of
"[::]:port" or "::" (for ResolveIPAddr) would internally resolve both
"::" and 0.0.0.0 and then prefer 0.0.0.0, even though the user was
looking up an IPv6 literal.

Add tests and fix it, not by undoing the fix to #18806 but by
selecting the preference function for Resolve*Addr more explicitly: we
still prefer IPv4, but if the address being looked up was an IPv6
literal, prefer IPv6.

The tests are skipped on machines without IPv6.

Fixes #20911

Change-Id: Ib7036cc43182ae4118cd1390c254e17c04a251a3
Reviewed-on: https://go-review.googlesource.com/47554
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ResolveTCPAddr, ResolveUDPAddr, and ResolveIPAddr return at most one
address. When given a name like "golang.org" to resolve that might
have more than 1 address, the net package has historically preferred
IPv4 addresses, with the assumption that many users don't yet have
IPv6 connectivity and randomly selecting between an IPv4 address and
an IPv6 address at runtime wouldn't be a good experience for IPv4-only
users.

In CL 45088 (78cf0e56) I modified the resolution of the
unspecified/empty address to internally resolve to both IPv6 "::" and
0.0.0.0 to fix issue #18806.

That code has 3 other callers I hadn't considered, though: the
Resolve*Addr functions. Since they preferred IPv4, any Resolve*Addr of
"[::]:port" or "::" (for ResolveIPAddr) would internally resolve both
"::" and 0.0.0.0 and then prefer 0.0.0.0, even though the user was
looking up an IPv6 literal.

Add tests and fix it, not by undoing the fix to #18806 but by
selecting the preference function for Resolve*Addr more explicitly: we
still prefer IPv4, but if the address being looked up was an IPv6
literal, prefer IPv6.

The tests are skipped on machines without IPv6.

Fixes #20911

Change-Id: Ib7036cc43182ae4118cd1390c254e17c04a251a3
Reviewed-on: https://go-review.googlesource.com/47554
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/http/httptest: allow creation of Server manually</title>
<updated>2017-06-30T23:48:06+00:00</updated>
<author>
<name>Joe Tsai</name>
<email>joetsai@digital-static.net</email>
</author>
<published>2017-06-30T21:10:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=14b07dfc7ec20df9d74bb69290571cf6fd2fe2fc'/>
<id>14b07dfc7ec20df9d74bb69290571cf6fd2fe2fc</id>
<content type='text'>
The Server struct has exported fields, which allows users to manually
create a Server object without using using NewServer or NewTLSServer
and directly call Start or StartTLS on their object.

In order to ensure that manual creation of Server works, the
NewUnstartedServer function should not initialize Server in any way
that the user was not able to do themselves. For example, the setting
of a unexported filed, client, is not something a user can do.
Thus, rather than setting the client field in NewUnstartedServer,
we lazily initialize it when Start or StartTLS is called.

Otherwise, the Server logic can nil panic later when it assumes that this
field has been initialized.

Fixes #20871

Change-Id: I65c6a9f893ea963b0fbad0990b33af08007c1140
Reviewed-on: https://go-review.googlesource.com/47353
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Server struct has exported fields, which allows users to manually
create a Server object without using using NewServer or NewTLSServer
and directly call Start or StartTLS on their object.

In order to ensure that manual creation of Server works, the
NewUnstartedServer function should not initialize Server in any way
that the user was not able to do themselves. For example, the setting
of a unexported filed, client, is not something a user can do.
Thus, rather than setting the client field in NewUnstartedServer,
we lazily initialize it when Start or StartTLS is called.

Otherwise, the Server logic can nil panic later when it assumes that this
field has been initialized.

Fixes #20871

Change-Id: I65c6a9f893ea963b0fbad0990b33af08007c1140
Reviewed-on: https://go-review.googlesource.com/47353
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: fix Windows TestInterfaceHardwareAddrWithGetmac</title>
<updated>2017-06-29T15:36:34+00:00</updated>
<author>
<name>Egon Elbre</name>
<email>egonelbre@gmail.com</email>
</author>
<published>2017-06-29T10:58:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=6b8813ca4515cd558f12eb26582cdfd5909c9f3b'/>
<id>6b8813ca4515cd558f12eb26582cdfd5909c9f3b</id>
<content type='text'>
TestInterfaceHardwareAddrWithGetmac was panicing when getmac returned
multiple network cards.

Change-Id: I6fefa5a4910bce805b4cd9c09f94bd56c9682b9e
Reviewed-on: https://go-review.googlesource.com/47190
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TestInterfaceHardwareAddrWithGetmac was panicing when getmac returned
multiple network cards.

Change-Id: I6fefa5a4910bce805b4cd9c09f94bd56c9682b9e
Reviewed-on: https://go-review.googlesource.com/47190
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/http: update bundled http2</title>
<updated>2017-06-29T03:26:16+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-06-29T00:10:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=070b82e2e8b28b067e08927228ee651dd54a4236'/>
<id>070b82e2e8b28b067e08927228ee651dd54a4236</id>
<content type='text'>
Updates http2 to x/net/http2 git rev d4223d6710a for:

    http2: refund connection flow control on DATA frames received after reset
    https://golang.org/cl/46591

Fixes #46591

Change-Id: I5e6999599e921fed279c6d29ae77439191e99615
Reviewed-on: https://go-review.googlesource.com/47096
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Tom Bergan &lt;tombergan@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates http2 to x/net/http2 git rev d4223d6710a for:

    http2: refund connection flow control on DATA frames received after reset
    https://golang.org/cl/46591

Fixes #46591

Change-Id: I5e6999599e921fed279c6d29ae77439191e99615
Reviewed-on: https://go-review.googlesource.com/47096
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Tom Bergan &lt;tombergan@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
