]> Cypherpunks repositories - gostls13.git/commitdiff
doc: note the StripPrefix change in Go 1.9 release notes
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 12 Jul 2017 19:40:39 +0000 (19:40 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 12 Jul 2017 23:12:26 +0000 (23:12 +0000)
Fixes #20948

Change-Id: I222bf101a5c1bdc5cbb0970949070c4b58b9b83b
Reviewed-on: https://go-review.googlesource.com/48190
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.9.html

index a4db8e90c06a056976eaf7305deb2b45a9a2364d..5df1e5cff7b84e84b19f7d891372dc20f8652fdd 100644 (file)
@@ -698,6 +698,17 @@ version of gccgo.
         Frames are scheduled by following HTTP/2 priorities as described in
         <a href="https://tools.ietf.org/html/rfc7540#section-5.3">RFC 7540 Section 5.3</a>.
       </li>
+
+      <li><!-- CL 36483 -->
+        The HTTP handler returned by <a href="/pkg/net/http/#StripPrefix"><code>StripPrefix</code></a>
+        now calls its provided handler with a modified clone of the original <code>*http.Request</code>.
+        Any code storing per-request state in maps keyed by <code>*http.Request</code> should
+        use
+        <a href="/pkg/net/http/#Request.Context"><code>Request.Context</code></a>,
+        <a href="/pkg/net/http/#Request.WithContext"><code>Request.WithContext</code></a>,
+        and
+        <a href="/pkg/context/#WithValue"><code>context.WithValue</code></a> instead.
+      </li>
     </ul>
 
     <p>Client &amp; Transport changes:</p>