How to set Content-Type header charset in OpenRasta

Posted by Sergey Mirvoda on Stack Overflow See other posts from Stack Overflow or by Sergey Mirvoda
Published on 2011-02-16T12:03:23Z Indexed on 2011/03/18 8:10 UTC
Read the original article Hit count: 507

Filed under:
|
|
|

When I return my object as JSON via JsonDataContractCodec OpenRasta sets Content-Type header to

application/json

but ignores charset part of content type.

When I use Chrome it sends GET request with folowing header:

Accept-Charset:windows-1251,utf-8;q=0.7,*;q=0.3

and all my utf-8 encoded json objects goes wrong.

I tried to override OperationResult with no luck. OpenRasta overwrites my header with codec's one.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about rest