Do not alter/set `$_SERVER` vars please - even if other parts of CI don't depend on that, the developer's code might do.
Why are you trying so hard to reinvent the wheel? What's wrong with `$this->headers['Content-Type'] = <expr>`?