http/response.go
func (w *tchanResponseWriter) writeHeaders() {
	// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.
	wb := typed.NewWriteBufferWithSize(10000)
	wb.WriteUint16(uint16(w.statusCode))
	writeVarintString(wb, http.StatusText(w.statusCode))
	writeHeaders(wb, w.headers)

	arg2Writer, err := w.response.Arg2Writer()
	if err != nil {
		w.err = err
		return
	}
	if _, w.err = wb.FlushTo(arg2Writer); w.err != nil {
		return
	}
	if w.err = arg2Writer.Close(); w.err != nil {
		return
	}

	w.arg3Writer, w.err = w.response.Arg3Writer()
}
func (w *tchanResponseWriter) writeHeaders() {
	// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.
	wb := typed.NewWriteBufferWithSize(10000)
	wb.WriteUint16(uint16(w.statusCode))
	writeVarintString(wb, http.StatusText(w.statusCode))
	writeHeaders(wb, w.headers)

	arg2Writer, err := w.response.Arg2Writer()
	if err != nil {
		w.err = err
		return
	}
	if _, w.err = wb.FlushTo(arg2Writer); w.err != nil {
		return
	}
	if w.err = arg2Writer.Close(); w.err != nil {
		return
	}

	w.arg3Writer, w.err = w.response.Arg3Writer()
}
// writeHeaders writes out the HTTP headers as arg2, and creates the arg3 writer.