diff options
| author | Anthony Lavado <anthonylavado@users.noreply.github.com> | 2019-06-05 01:11:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-05 01:11:25 -0400 |
| commit | 256f44a87029577ed5daa7646c68e8a395e19708 (patch) | |
| tree | af2f46e34632fe989831f9f5873b6faccf830fc9 /Emby.Server.Implementations/SocketSharp/RequestMono.cs | |
| parent | f631b2ecdc4554fb723f7e7939a1a6f4e21f4f06 (diff) | |
| parent | ce1fa42f9d39add8467bfed186730c4a9545344d (diff) | |
Merge pull request #994 from Bond-009/tasks
Remove Tasks wrapped in a Task
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/RequestMono.cs')
| -rw-r--r-- | Emby.Server.Implementations/SocketSharp/RequestMono.cs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/RequestMono.cs b/Emby.Server.Implementations/SocketSharp/RequestMono.cs index 373f6d758..ec637186f 100644 --- a/Emby.Server.Implementations/SocketSharp/RequestMono.cs +++ b/Emby.Server.Implementations/SocketSharp/RequestMono.cs @@ -86,8 +86,7 @@ namespace Emby.Server.Implementations.SocketSharp else { // We use a substream, as in 2.x we will support large uploads streamed to disk, - var sub = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length); - files[e.Name] = sub; + files[e.Name] = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length); } } } @@ -374,7 +373,7 @@ namespace Emby.Server.Implementations.SocketSharp var elem = new Element(); ReadOnlySpan<char> header; - while ((header = ReadHeaders().AsSpan()) != null) + while ((header = ReadLine().AsSpan()).Length != 0) { if (header.StartsWith("Content-Disposition:".AsSpan(), StringComparison.OrdinalIgnoreCase)) { @@ -513,17 +512,6 @@ namespace Emby.Server.Implementations.SocketSharp return false; } - private string ReadHeaders() - { - string s = ReadLine(); - if (s.Length == 0) - { - return null; - } - - return s; - } - private static bool CompareBytes(byte[] orig, byte[] other) { for (int i = orig.Length - 1; i >= 0; i--) |
