From 67449276a54b6cdd134b7e4a0b4a6189d717d4fa Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 11 Mar 2016 09:34:32 -0800 Subject: [PATCH] Target minimal TFMs --- .../ContentDispositionHeaderValue.cs | 2 +- src/Microsoft.Net.Http.Headers/HttpRuleParser.cs | 2 +- src/Microsoft.Net.Http.Headers/project.json | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs b/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs index 6a3cb271c9..5ee589440a 100644 --- a/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs +++ b/src/Microsoft.Net.Http.Headers/ContentDispositionHeaderValue.cs @@ -511,7 +511,7 @@ namespace Microsoft.Net.Http.Headers { var encoding = Encoding.GetEncoding(parts[1]); var bytes = Convert.FromBase64String(parts[3]); - output = encoding.GetString(bytes); + output = encoding.GetString(bytes, 0, bytes.Length); return true; } catch (ArgumentException) diff --git a/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs b/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs index b1690e96fd..e30465bd4f 100644 --- a/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs +++ b/src/Microsoft.Net.Http.Headers/HttpRuleParser.cs @@ -41,7 +41,7 @@ namespace Microsoft.Net.Http.Headers internal const int MaxInt32Digits = 10; // iso-8859-1, Western European (ISO) - internal static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding(28591); + internal static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding("iso-8859-1"); static HttpRuleParser() { diff --git a/src/Microsoft.Net.Http.Headers/project.json b/src/Microsoft.Net.Http.Headers/project.json index 6f42f8cd38..ceec7e3af1 100644 --- a/src/Microsoft.Net.Http.Headers/project.json +++ b/src/Microsoft.Net.Http.Headers/project.json @@ -15,19 +15,18 @@ }, "dependencies": {}, "frameworks": { - "net451": {}, - "netstandard1.3": { + "netstandard1.0": { "dependencies": { "System.Collections": "4.0.11-*", "System.Diagnostics.Contracts": "4.0.1-*", "System.Globalization": "4.0.11-*", - "System.Globalization.Extensions": "4.0.1-*", "System.Linq": "4.1.0-*", + "System.Resources.ResourceManager": "4.0.1-*", + "System.Runtime.Extensions": "4.1.0-*", "System.Text.Encoding": "4.0.11-*", - "System.Resources.ResourceManager": "4.0.1-*" }, "imports": [ - "dotnet5.4" + "dotnet5.1" ] } }