Fixing segfault for POST requests when no content-type is set. See issue...

... #4650.