AFNetworking/AFNetworking — pull request #531 by peymano (2012-09-20 00:08:01+00:00)
Title: Fix HTTP Accept header parsing in AFContentTypesFromHTTPHeader()

AFContentTypesFromHTTPHeader() is splitting media ranges by ";" when it should be splitting them by ",".

E.g., given the Accept header:

application/json, application/vnd.example.com-v2+json

AFContentTypesFromHTTPHeader() would return a set containing 1 object, the entire header, which is incorrect. It should return a set containing 2 objects: `application/json` and `application/vnd.example.com-v2+json`.

The format of the Accept header is described at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html . Note that multiple "media ranges" are separated by `,` and each "media range" may have parameters, which are separated by `;`, as in (taken from the spec):

Accept: text/*, text/html, text/html;level=1, */*

Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5