3

When my script respond with status 204 No Content response, Apache adds Content-Type header automatically, even there is no content, just HTTP headers.

Is there a way to force Apache to not include Content-Type header with status 204 in httpd.conf or .htaccess configuration files, or even by any other way?

Ωmega
  • 42,614
  • 34
  • 134
  • 203
  • That's odd. What value does Apache set the header to? – dland Nov 26 '14 at 09:39
  • 2
    @dland - In my case it is "text/plain; charset=utf-8", but I guess it depends on system configuration. – Ωmega Nov 27 '14 at 02:10
  • 1
    You can set the `DefaultType` to `None` in `httpd.conf`. (See [this SO answer](http://stackoverflow.com/a/8398578/800579)) – cyfur01 Sep 17 '15 at 16:01

0 Answers0