Minor cleanup in the pursuit of a segfault.
Slightly kludgey, but I fixed the content-type parsing.