views:

18

answers:

1

For intance, text/html, audio/mpeg, etc? Can I safely assume that anything that is text based will actually have text/??? as its content type in the header when the server returns the document?

+1  A: 

No, you can't assume that. There's types like 'application/xml' (which is exactly the same thing as 'text/xml', so I have no idea why they came up with that one).

Mike Baranczak
Ok, is there a list of all these possibilities? Or maybe at least a list of all the common types that are most definitely not text based?
Rhubarb
*application/xml* and *text/xml* is *not* the same. They behave differently when there is no `charset` parameter. Because the default charset value for *text/xml* is `us-ascii` while *application/xml* does not specify any default.
Gumbo