diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-18 17:04:01 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-18 17:04:01 +0100 |
| commit | d116efe1f78c1ad1aa69221b3092800348d23503 (patch) | |
| tree | 58670996079d97ce83db201ae85800b377337957 /Emby.Server.Implementations/Services/HttpResult.cs | |
| parent | c1f76eb8ab2c4fe536a9b612d659bf739f0cc7ac (diff) | |
| parent | 440350a3f649b648f43a1d531153cc2c68edbee5 (diff) | |
Merge branch 'dev' into reformat
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 7ce41a368..296da2f7a 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) { |
