This is partly a port of my Java parser: https://gist.github.com/ArtemGr/38425.
SCGI parsing errors.
Parse the headers, invoking the
Read the headers from the stream.
Parse the headers and pack them as slices into a map.
Parse the headers and pack them as strings into a map.