Closed ohmycloud closed 6 years ago
Well, the RFC I believe applies here suggests it's a bug in whatever server is producing a media type with a trailing ;
. The grammar specified in there doesn't permit it.
However, per Postel's law, we should be liberal in what we accept, and looking at some other media type parsers it seems they choose to allow a trailing ;
, so there's precedent for this. Thus I think we should change the parser to allow such mildly malformed media types, for the sake of users who have to deal with servers spitting out such things.
some Server return
content-type
ofapplication/json; charset=utf-8;
instead ofapplication/json; charset=utf-8
, and thus lead to media type parse error, See this question on SO, I don't know it is a bug or not.