fix content-type overriding issue #1760.

Could you review my change regarding issue #1760 ?