I\'m wondering if I can return the response header
Content-Type: application/json text/json
or isn\'t this legal?
The HTTP protoc
No. As pointed out in the accepted answer, the header value itself does not allow for multiple values, and it is also not allowed to send multiple Content-Type headers:
A sender MUST NOT generate multiple header fields with the same field name in a message unless either the entire field value for that header field is defined as a comma-separated list [i.e., #(values)] or the header field is a well-known exception (as noted below).
https://tools.ietf.org/html/rfc7230#section-3.2.2
None of the "escape clauses" holds, because media-type does not allow a comma-separated list of values, and Content-Type evidently is not a well-known exception, either.