[Mono-list] System.Uri bug on small port numbers

P. Oscar Boykin oscar.boykin at gmail.com
Wed Jul 5 15:04:59 EDT 2006


It seems that System.Uri throws the following exception:
System.UriFormatException: Invalid URI: The hostname could not be parsed

anytime the port number is between 0 and 9 inclusive.

This appears to be a bug to me.  At the very least, the exception should say
that the port number is invalid (although, I don't see any reason to do that
either).

Find attached a test program and its output.

Best,
-- 
P. Oscar Boykin                            http://boykin.acis.ufl.edu
Assistant Professor, Department of Electrical and Computer Engineering
University of Florida
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20060705/426f476b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uri_test.cs
Type: application/octet-stream
Size: 382 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060705/426f476b/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output
Type: application/octet-stream
Size: 4832 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20060705/426f476b/attachment-0001.obj 


More information about the Mono-list mailing list