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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=78799 --- shadow/78799 2006-07-08 18:06:04.000000000 -0400 +++ shadow/78799.tmp.6852 2006-08-01 06:09:41.000000000 -0400 @@ -1,14 +1,14 @@ Bug#: 78799 Product: Mono: Class Libraries Version: 1.1 -OS: +OS: unknown OS Details: Status: NEW Resolution: -Severity: +Severity: Unknown Priority: Wishlist Component: System AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- @@ -20,6 +20,42 @@ Unhandled Exception: System.MissingMethodException: Method not found: 'System.Uri.op_Equality'. The method is implemented in .NET Framework 2.0 but not in Mono which prevents smooth migration. + +------- Additional Comments From [EMAIL PROTECTED] 2006-08-01 06:09 ------- +These methods are now in the URI class, so this could be closed... + +Also, i believe the implementation of these methods is flawed. From +MSDN you can see that the inequality method return value is as +follows: + +true if the two Uri instances are not equal; otherwise, false. If +either parameter is a null reference (Nothing in Visual Basic), this +method returns true. + +And when checking for equality: +UserInfo and Fragment content is ignored when making this comparison. + +The obvious mistakes i've noticed so far are that UserInfo is taken +into account when checking for equality. Also, it's possible that +equals will return true if one of the parameters is null, which is +wrong. I'm not sure how fragment checking works... but that may also +be broken. + +Here's an updated method which fixes those two bugs. It would still +need testing to make sure fragments are being correctly ignored: + + public static bool operator == (Uri u1, Uri u2) + { + if (u1 == null || u2 == null) + return false; + + return u1.scheme == u2.scheme && + u1.host == u2.host && + u1.port == u2.port && + u1.path == u2.path && + u1.query == u2.query; + } + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
