Skip to content

Commit

Permalink
Force UTF8 serving of raw content
Browse files Browse the repository at this point in the history
  • Loading branch information
garuma committed Dec 23, 2011
1 parent 27a438d commit 6edfc57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ContextExtensions.cs
Expand Up @@ -21,6 +21,7 @@
//

using System;
using System.Text;

using Manos;
using Manos.Http;
Expand Down Expand Up @@ -48,7 +49,7 @@ public static void RawServing (this IHttpResponse response, string mime, int max
{
response.Headers.SetNormalizedHeader ("Content-Type", "Content-Type: "+mime+"; charset=utf-8");
response.Headers.SetNormalizedHeader ("Cache-Control", "max-age=" + maxAge);
response.End (data);
response.End (Encoding.UTF8.GetBytes (data));
}
}
}

0 comments on commit 6edfc57

Please sign in to comment.