aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/HttpParserBase.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-07-06 23:08:52 +0200
committerGitHub <noreply@github.com>2019-07-06 23:08:52 +0200
commit82f041d050f998d20818efff063b6000dfcbf5d2 (patch)
tree3be5cf1a79180c57a5381e26f60d61088a27b49e /RSSDP/HttpParserBase.cs
parent4f17ed961e2756e0c65b1bb0246e7f62a5f44a8a (diff)
parentba551b48e1e1c80192e10b1bb340d974c6b6dee2 (diff)
Merge branch 'master' into release-10.3.z
Diffstat (limited to 'RSSDP/HttpParserBase.cs')
-rw-r--r--RSSDP/HttpParserBase.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/RSSDP/HttpParserBase.cs b/RSSDP/HttpParserBase.cs
index 18712470d..76d816e7b 100644
--- a/RSSDP/HttpParserBase.cs
+++ b/RSSDP/HttpParserBase.cs
@@ -23,8 +23,6 @@ namespace Rssdp.Infrastructure
#region Public Methods
- private static byte[] EmptyByteArray = new byte[]{};
-
/// <summary>
/// Parses the <paramref name="data"/> provided into either a <see cref="HttpRequestMessage"/> or <see cref="HttpResponseMessage"/> object.
/// </summary>
@@ -46,7 +44,7 @@ namespace Rssdp.Infrastructure
if (data.Length == 0) throw new ArgumentException("data cannot be an empty string.", nameof(data));
if (!LineTerminators.Any(data.Contains)) throw new ArgumentException("data is not a valid request, it does not contain any CRLF/LF terminators.", nameof(data));
- using (var retVal = new ByteArrayContent(EmptyByteArray))
+ using (var retVal = new ByteArrayContent(Array.Empty<byte>()))
{
var lines = data.Split(LineTerminators, StringSplitOptions.None);
@@ -209,4 +207,4 @@ namespace Rssdp.Infrastructure
#endregion
}
-} \ No newline at end of file
+}