From 3e06bda46b2569c1df47d9ab0c7a763dcf3b1451 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 12 Nov 2016 20:53:51 -0500 Subject: update components --- ServiceStack/HttpResponseExtensionsInternal.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ServiceStack/HttpResponseExtensionsInternal.cs') 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; } -- cgit v1.2.3