Added fix for setting content type in header for json encoded messages.