diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-12 20:53:51 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-12 20:53:51 -0500 |
| commit | 3e06bda46b2569c1df47d9ab0c7a763dcf3b1451 (patch) | |
| tree | e2ff92c2e6848d91488a61bf52e1fd8dd97053d6 /ServiceStack/HttpResponseExtensionsInternal.cs | |
| parent | 38c216a61a3dc389d1ddab2a37b4b032a6de13d0 (diff) | |
update components
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; } |
