aboutsummaryrefslogtreecommitdiff
path: root/ServiceStack/HttpResponseExtensionsInternal.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-12 20:57:19 -0500
committerGitHub <noreply@github.com>2016-11-12 20:57:19 -0500
commitaf127bcafde60f9a455d71ec5ded78b42c5db3fa (patch)
tree4aeac6c9fb23b852590e271fdeac8b99d9f3a6ad /ServiceStack/HttpResponseExtensionsInternal.cs
parent10576b1108b2f174cc0456228b109a266d543a7c (diff)
parent3e06bda46b2569c1df47d9ab0c7a763dcf3b1451 (diff)
Merge pull request #2286 from MediaBrowser/dev
Dev
Diffstat (limited to 'ServiceStack/HttpResponseExtensionsInternal.cs')
-rw-r--r--ServiceStack/HttpResponseExtensionsInternal.cs4
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;
}