[Mono-bugs] [Bug 58626][Nor] New - MONO BETA 1 Bug in HttpUtility.UrlEncode()

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 17 May 2004 23:40:26 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by davidandrewtaylor@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58626

--- shadow/58626	2004-05-17 23:40:26.000000000 -0400
+++ shadow/58626.tmp.17536	2004-05-17 23:40:26.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 58626
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 001 One hour
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: davidandrewtaylor@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: MONO BETA 1 Bug in HttpUtility.UrlEncode()
+
+Description of Problem:
+There is a minor problem with the HttpUtility.UrlEncode static method, 
+and the same instance method on the HttpServerUtility class.  When URL 
+Encoding on MS.NET, it outputs HEX values in lowercase "%3a" compared to 
+MONO which uses uppercase "%3A".  Whilst I realize this is a minor issue, 
+one of my programs was doing a case sensitive string comparison on the 
+URL which was broken by this bug.  It should be a really small change and 
+will increase compatibility with MS.NET.
+
+Steps to reproduce the problem:
+using System;
+using System.Web;
+public class Test
+{
+  public static void Main()
+  {
+  	string encoded = HttpUtility.UrlEncode("http://ximian?ximain&");
+	// Need to ensure HttpServerUtility instance methods fixed.
+  	Console.WriteLine(encoded);
+  }
+}
+
+Actual Results:
+http%3A%2F%2Fximian%3Fximain%26
+
+Expected Results:
+http%3a%2f%2fximian%3fximain%26
+
+How often does this happen? 
+All the time on MONO.