Consider an HTTP request that gets the following response:
405 Method Not Allowed
Content-Length: 0
What should the content-type of something like this be?
- Set to nothing?
- Not set?
- Set to
text/plain
ortext/html
Consider an HTTP request that gets the following response:
405 Method Not Allowed
Content-Length: 0
What should the content-type of something like this be?
text/plain
or text/html
You haven't got any content, therefore I wouldn't set a Content-Type
at all. If you find that causes problems to clients (which seems unlikely, to be honest), I'd probably go with text/plain
- definitely not text/html
, as your "empty content" is not an HTML document.
© 2022 - 2024 — McMap. All rights reserved.