Fix crashing when no Content-Type given

Sorry, I guess I messed things up with my last patch. Here is the fix.