# HG changeset patch # User moel.mich # Date 1286043346 0 # Node ID 1fa8eddc24a73b505de7a403144e2405960cd4f0 # Parent a38b51ef489c76833e4028fd56176ade8abaded6 Replaced HttpUtility.UrlEncode with Uri.EscapeDataString and deleted the reference to the System.Web assembly. The System.Web assembly seems to be missing on some .NET 4.0 installations (and the overhead of using it is a bit large, just for the UrlEncode method). diff -r a38b51ef489c -r 1fa8eddc24a7 GUI/CrashForm.cs --- a/GUI/CrashForm.cs Sat Oct 02 15:46:12 2010 +0000 +++ b/GUI/CrashForm.cs Sat Oct 02 18:15:46 2010 +0000 @@ -36,13 +36,9 @@ */ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; using System.IO; using System.Net; using System.Text; -using System.Web; using System.Windows.Forms; namespace OpenHardwareMonitor.GUI { @@ -88,11 +84,11 @@ request.ContentType = "application/x-www-form-urlencoded"; string report = - "type=crash&" + - "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" + - "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" + - "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" + - "email=" + HttpUtility.UrlEncode(emailTextBox.Text); + "type=crash&" + + "version=" + Uri.EscapeDataString(version.ToString()) + "&" + + "report=" + Uri.EscapeDataString(reportTextBox.Text) + "&" + + "comment=" + Uri.EscapeDataString(commentTextBox.Text) + "&" + + "email=" + Uri.EscapeDataString(emailTextBox.Text); byte[] byteArray = Encoding.UTF8.GetBytes(report); request.ContentLength = byteArray.Length; diff -r a38b51ef489c -r 1fa8eddc24a7 GUI/ReportForm.cs --- a/GUI/ReportForm.cs Sat Oct 02 15:46:12 2010 +0000 +++ b/GUI/ReportForm.cs Sat Oct 02 18:15:46 2010 +0000 @@ -36,13 +36,10 @@ */ using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Drawing; using System.IO; using System.Net; using System.Text; -using System.Web; using System.Windows.Forms; namespace OpenHardwareMonitor.GUI { @@ -76,11 +73,11 @@ request.ContentType = "application/x-www-form-urlencoded"; string report = - "type=hardware&" + - "version=" + HttpUtility.UrlEncode(version.ToString()) + "&" + - "report=" + HttpUtility.UrlEncode(reportTextBox.Text) + "&" + - "comment=" + HttpUtility.UrlEncode(commentTextBox.Text) + "&" + - "email=" + HttpUtility.UrlEncode(emailTextBox.Text); + "type=hardware&" + + "version=" + Uri.EscapeDataString(version.ToString()) + "&" + + "report=" + Uri.EscapeDataString(reportTextBox.Text) + "&" + + "comment=" + Uri.EscapeDataString(commentTextBox.Text) + "&" + + "email=" + Uri.EscapeDataString(emailTextBox.Text); byte[] byteArray = Encoding.UTF8.GetBytes(report); request.ContentLength = byteArray.Length; diff -r a38b51ef489c -r 1fa8eddc24a7 OpenHardwareMonitor.csproj --- a/OpenHardwareMonitor.csproj Sat Oct 02 15:46:12 2010 +0000 +++ b/OpenHardwareMonitor.csproj Sat Oct 02 18:15:46 2010 +0000 @@ -61,7 +61,6 @@ -