remove excess cruft
Abort curl on parse failure
remove unnecessary rawmemchr call
remove useless cast