Moved the creation of the content_length header line into it's own function since all responses will need that.
Respond with 500 instead of responding with a generic string.
Respond with 500.
Store a return value and set it before a goto jump so we don't need to duplicate the return sections simply to use a different return code.