encodeHttpResponseHead function
Encodes a response head (status line, HttpResponseHead.headers, blank
line) as Latin-1 wire bytes; characters wider than Latin-1 become ?.
Implementation
Uint8List encodeHttpResponseHead(HttpResponseHead head) => _encodeHead(
'HTTP/${head.version} ${head.status}'
'${head.reason.isEmpty ? '' : ' ${head.reason}'}',
head.headers,
);