diff options
Diffstat (limited to 'ServiceStack/HttpResponseExtensionsInternal.cs')
| -rw-r--r-- | ServiceStack/HttpResponseExtensionsInternal.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ServiceStack/HttpResponseExtensionsInternal.cs b/ServiceStack/HttpResponseExtensionsInternal.cs index 318d62429..f78647721 100644 --- a/ServiceStack/HttpResponseExtensionsInternal.cs +++ b/ServiceStack/HttpResponseExtensionsInternal.cs @@ -161,10 +161,8 @@ namespace ServiceStack var responseText = result as string; if (responseText != null) { - if (response.ContentType == null || response.ContentType == "text/html") - response.ContentType = defaultContentType; - var bytes = Encoding.UTF8.GetBytes(responseText); + response.SetContentLength(bytes.Length); await response.OutputStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false); return; } |
