diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-01-16 19:10:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-16 19:10:42 +0100 |
| commit | 900dc851e6c810f9e1772a6fb901a5a7e2801baf (patch) | |
| tree | 205bac3cd6df971ee18739e59bd4da0ffe91718b /Jellyfin.Server/SocketSharp/RequestMono.cs | |
| parent | 07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (diff) | |
| parent | 933ef438894ed233fec46badf58dd4f26492e832 (diff) | |
Merge branch 'dev' into cleanup
Diffstat (limited to 'Jellyfin.Server/SocketSharp/RequestMono.cs')
| -rw-r--r-- | Jellyfin.Server/SocketSharp/RequestMono.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.cs index 31f289497..4c3d8d1d5 100644 --- a/Jellyfin.Server/SocketSharp/RequestMono.cs +++ b/Jellyfin.Server/SocketSharp/RequestMono.cs @@ -97,12 +97,12 @@ namespace Jellyfin.SocketSharp } #if NET_4_0 - if (validateRequestNewMode && !checked_form) { - // Setting this before calling the validator prevents - // possible endless recursion - checked_form = true; - ValidateNameValueCollection ("Form", query_string_nvc, RequestValidationSource.Form); - } else + if (validateRequestNewMode && !checked_form) { + // Setting this before calling the validator prevents + // possible endless recursion + checked_form = true; + ValidateNameValueCollection ("Form", query_string_nvc, RequestValidationSource.Form); + } else #endif if (validate_form && !checked_form) { @@ -138,7 +138,7 @@ namespace Jellyfin.SocketSharp if (v.Length > 20) v = v.Substring(0, 16) + "...\""; - string msg = String.Format("A potentially dangerous Request.{0} value was " + + string msg = string.Format("A potentially dangerous Request.{0} value was " + "detected from the client ({1}={2}).", name, key, v); throw new Exception(msg); @@ -328,13 +328,13 @@ namespace Jellyfin.SocketSharp public override int Read(byte[] buffer, int dest_offset, int count) { if (buffer == null) - throw new ArgumentNullException("buffer"); + throw new ArgumentNullException(nameof(buffer)); if (dest_offset < 0) - throw new ArgumentOutOfRangeException("dest_offset", "< 0"); + throw new ArgumentOutOfRangeException(nameof(dest_offset), "< 0"); if (count < 0) - throw new ArgumentOutOfRangeException("count", "< 0"); + throw new ArgumentOutOfRangeException(nameof(count), "< 0"); int len = buffer.Length; if (dest_offset > len) @@ -546,7 +546,7 @@ namespace Jellyfin.SocketSharp const byte HYPHEN = (byte)'-', LF = (byte)'\n', CR = (byte)'\r'; - // See RFC 2046 + // See RFC 2046 // In the case of multipart entities, in which one or more different // sets of data are combined in a single body, a "multipart" media type // field must appear in the entity's header. The body must then contain |
