Fix header parsing and form data parsing