better handling of the Content-Type header