Closed tuesdaysiren closed 12 years ago
Conrad,
Thanks for catching this and sending a pull request! I ended up implementing it a little differently but should fix the issue:
public IWebFormatter CreateFormatter(string contentType)
{
string resolvedContentType;
if (contentType.Contains(";")) contentType = contentType.Split(';').First();
return CreateFormatter(new [] { contentType }, out resolvedContentType);
}
Let me know if this will work.
Thanks again,
m
That looks good to me. Thanks.
Ok, just committed and deployed the nuget. You should be good to go.
Thanks!
m
On Tue, Feb 14, 2012 at 2:09 AM, Conrad Tran < reply@reply.github.com
wrote:
That looks good to me. Thanks.
Reply to this email directly or view it on GitHub: https://github.com/mikeobrien/WcfRestContrib/pull/15#issuecomment-3956211
I notice that Firefox Content-Type is "text/json; charset=UTF-8" which result in the WebFormatterFactory always return the WebFormatter for the default MimeType since is trying to find the formatter for "text/json; charset=UTF-8". Anyway, this is a quick fix for that particular problem.