From: Russ Cox Date: Wed, 27 Jan 2016 16:02:45 +0000 (-0500) Subject: doc: mention ServeFile change in go1.6.html X-Git-Tag: go1.6rc1~10 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=01ca4da0efc6036bf22a99593a583c1efc2750c5;p=gostls13.git doc: mention ServeFile change in go1.6.html Also fix a few bad links. Change-Id: If04cdd312db24a827a3c958a9974c50ab148656c Reviewed-on: https://go-review.googlesource.com/18979 Reviewed-by: Brad Fitzpatrick --- diff --git a/doc/go1.6.html b/doc/go1.6.html index cd1515224d..46a8f65db3 100644 --- a/doc/go1.6.html +++ b/doc/go1.6.html @@ -654,7 +654,7 @@ and add NYCbCrA and -NYCbCrA +NYCbCrA types, to support Y'CbCr images with non-premultiplied alpha. @@ -738,12 +738,20 @@ This is arguably a mistake but is not yet fixed. See https://golang.org/issue/13 The net/http package has a number of minor additions beyond the HTTP/2 support already discussed. First, the -FileServer now sorts its generated directory listings by file name. +FileServer now sorts its generated directory listings by file name. Second, the -Client now allows user code to set the +ServeFile function now refuses to serve a result +if the request's URL path contains “..” (dot-dot) as a path element. +Programs should typically use FileServer and +Dir +instead of calling ServeFile directly. +Programs that need to serve file content in response to requests for URLs containing dot-dot can +still call ServeContent. +Third, the +Client now allows user code to set the Expect: 100-continue header (see -Transport.ExpectContinueTimeout). -Third, there are +Transport.ExpectContinueTimeout). +Fourth, there are five new error codes from RFC 6585: StatusPreconditionRequired (428), StatusTooManyRequests (429), @@ -751,10 +759,10 @@ Third, there are StatusUnavailableForLegalReasons (451)), and StatusNetworkAuthenticationRequired (511). -Fourth, the implementation and documentation of -CloseNotifier +Fifth, the implementation and documentation of +CloseNotifier has been substantially changed. -The Hijacker +The Hijacker interface now works correctly on connections that have previously been used with CloseNotifier. The documentation now describes when CloseNotifier @@ -764,17 +772,17 @@ is expected to work.
  • Also in the net/http package, there are a few changes related to the handling of a -Request data structure with its Method field set to the empty string. +Request data structure with its Method field set to the empty string. An empty Method field has always been documented as an alias for "GET" and it remains so. However, Go 1.6 fixes a few routines that did not treat an empty Method the same as an explicit "GET". Most notably, in previous releases -Client followed redirects only with +Client followed redirects only with Method set explicitly to "GET"; in Go 1.6 Client also follows redirects for the empty Method. Finally, -NewRequest accepts a method argument that has not been +NewRequest accepts a method argument that has not been documented as allowed to be empty. In past releases, passing an empty method argument resulted in a Request with an empty Method field.