Commit 9ad47c4f authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

doc: add http.NoBody and Transport change to go1.8.html

Fixes #18257

Change-Id: Iafba5aa0a0641cfe36351bb0e4b57f20257fdc4e
Reviewed-on: https://go-review.googlesource.com/34210Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 00efa446
......@@ -1320,6 +1320,22 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
to use IPv4 as a backup if it looks like IPv6 might be
failing.
</li>
<li> <!-- CL 31726 -->
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
no longer reads a byte of a non-nil
<a href="/pkg/net/http/#Request.Body"><code>Request.Body</code></a>
when the
<a href="/pkg/net/http/#Request.ContentLength"><code>Request.ContentLength</code></a>
is zero to determine whether the <code>ContentLength</code>
is actually zero or just undefined.
To explicitly signal that a body has zero length,
either set it to <code>nil</code>, or set it to the new value
<a href="/pkg/net/http/#NoBody"><code>NoBody</code></a>.
The new <code>NoBody</code> value is intended for use by <code>Request</code>
constructor functions; it is used by
<a href="/pkg/net/http/#NewRequest"><code>NewRequest</code></a>.
</li>
</ul>
</dd>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment