Improved checking of Content-Type header