by tcopeland on 8/13/18, 1:43 PM with 1 comments
by vectorEQ on 8/13/18, 1:59 PM
from rfc: A sender that generates a message containing a payload body SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender. If a Content-Type header field is not present, the recipient MAY either assume a media type of "application/octet-stream" ([RFC2046], Section 4.5.1) or examine the data to determine its type.
here it says SHOULD, which is:
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.
https://tools.ietf.org/html/rfc2616
Ran into so many things that just don't respond atall when that header is there, that i made it practice just to include it in every http request i make, even if it's mainly just plaintext media type which you fill in... you can see that by rfc one would assume it's an octet-stream, so an xml would never be excpected if someone built to specifications.