Output if EOF
case insensitive when checking header
add comments, handle incomplete headers, parse range line if it does not have bytes
add comments for clarity