diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-06 20:35:36 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-01-06 20:35:36 +0100 |
| commit | 07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (patch) | |
| tree | 86cc8c77ebf98985cfa8f4727f0f900d24219042 /Emby.Server.Implementations/Services/HttpResult.cs | |
| parent | b27315bc08d4d224cf090efc24385c7102741089 (diff) | |
Cleanup some small things
Diffstat (limited to 'Emby.Server.Implementations/Services/HttpResult.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/HttpResult.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Services/HttpResult.cs b/Emby.Server.Implementations/Services/HttpResult.cs index 91314c15a..66813f461 100644 --- a/Emby.Server.Implementations/Services/HttpResult.cs +++ b/Emby.Server.Implementations/Services/HttpResult.cs @@ -15,7 +15,6 @@ namespace Emby.Server.Implementations.Services public HttpResult(object response, string contentType, HttpStatusCode statusCode) { this.Headers = new Dictionary<string, string>(); - this.Cookies = new List<Cookie>(); this.Response = response; this.ContentType = contentType; @@ -26,8 +25,6 @@ namespace Emby.Server.Implementations.Services public IDictionary<string, string> Headers { get; private set; } - public List<Cookie> Cookies { get; private set; } - public int Status { get; set; } public HttpStatusCode StatusCode @@ -40,15 +37,16 @@ namespace Emby.Server.Implementations.Services public async Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken) { - var response = RequestContext != null ? RequestContext.Response : null; + var response = RequestContext == null ? null : RequestContext.Response; - var bytesResponse = this.Response as byte[]; - if (bytesResponse != null) + if (this.Response is byte[] bytesResponse) { var contentLength = bytesResponse.Length; if (response != null) + { response.SetContentLength(contentLength); + } if (contentLength > 0) { |
