diff options
| author | Claus Vium <clausvium@gmail.com> | 2019-03-05 19:20:28 +0100 |
|---|---|---|
| committer | Claus Vium <clausvium@gmail.com> | 2019-03-05 19:20:28 +0100 |
| commit | 78742b8e4c658b1f02c9c040b8abb8ee5742bed4 (patch) | |
| tree | 6ee8afb5b09e9ee85de83fbe231786b9759a9837 /MediaBrowser.Api/Library/LibraryService.cs | |
| parent | 318e0d4a2449baff806afb4ee22dc0f4021ca180 (diff) | |
Switch to HeaderNames instead of hardcoded strings (and other header related fixes)
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index d44b07256..8eefbdf2c 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -29,6 +29,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Services; using Microsoft.Extensions.Logging; +using Microsoft.Net.Http.Headers; namespace MediaBrowser.Api.Library { @@ -827,7 +828,7 @@ namespace MediaBrowser.Api.Library var filename = (Path.GetFileName(path) ?? string.Empty).Replace("\"", string.Empty); if (!string.IsNullOrWhiteSpace(filename)) { - headers["Content-Disposition"] = "attachment; filename=\"" + filename + "\""; + headers[HeaderNames.ContentDisposition] = "attachment; filename=\"" + filename + "\""; } return ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions |
