Thank you -- that makes sense. I was initially thrown off by the fact that
the connection remains open for netcat to get the full HTTP response.
For posterity, another way to get the desired behaviour is to invoke netcat
as follows, noting that it won't exit by itself anymore:
> cat ~/tmp/paylo
According to https://golang.org/pkg/net/http/#Request.Context:
For incoming server requests, the context is canceled when the client's
> connection closes, the request is canceled (with HTTP/2), or when the
> ServeHTTP method returns.
My expectation, then, is for the following code to block: