io.Copy Write io.Writer. http.ResponseWriter Write :
Write([]byte) (int, error)
, WriteHeader:
// WriteHeader sends an HTTP response header with status code.
// If WriteHeader is not called explicitly, the first call to Write
// will trigger an implicit WriteHeader(http.StatusOK).
// Thus explicit calls to WriteHeader are mainly used to
// send error codes.
WriteHeader(int)
, HD , Write 200 OK, , Content-Length, , - , .
HTTP 1.1 chunked transfer encoding HTTP-. , HTTP- -.
@OneOfOne: io.Copy , ; .
, , 4xx 5xx, ?
HTTP, , ; , .