What Content-Type should a 204 No Response use?

You have Content-Type when you have content and even then it’s optional:

Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body.

(from RFC2616, ยง7.2.1, please note the use of SHOULD).

Since there is no content, then there is no reason to specify a Content-Type header.

Leave a Comment