code: func simulatePrematurelyClosedConnection(rw http.ResponseWriter, req *http.Request) {
  	flusher, ok := rw.(http.Flusher)
  	if !ok {
  		return
  	}
  	hj, ok := rw.(http.Hijacker)
  	if !ok {
  		return
  	}
  	for n := 1; n <= 100; n++ {
  		fmt.Fprintf(rw, "line %d\n", n)
  		flusher.Flush()
  	}
  	wrc, _, _ := hj.Hijack()
  	wrc.Close() // without sending final chunk; should be an error for the client
  }
docs: // For client testing.