[Mono-dev] Custom Uri Parsing
Matt Dargavel
matt at shout-telecoms.com
Fri Feb 12 13:52:26 EST 2010
Thanks for the info Alan.
At the moment I've put together a very quick and dirty version that uses
IsPredefinedScheme to decide whether to use the existing parsing code or
use the registered Parser class when the Uri is first created (and
parsed).
I was wondering whether something along the lines of moving the existing
parsing routine in to DefaultUriParser and use this for the predefined
schemes might be possible. You might then be able to replace this with
the proper Parser classes for the built in schemes one by one. This
would allow people to write parsers for unsupported schemes, and would
hopefully pass the existing tests.
Anyway, I'll look in to it a bit more and see if I can come up with a
more definite suggestion.
Cheers,
Matt.
From: Alan McGovern [mailto:alan.mcgovern at gmail.com]
Sent: 11 February 2010 11:45 PM
To: Miguel de Icaza
Cc: Matt Dargavel; mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Custom Uri Parsing
Hey,
The main reason why I didn't actually do any work on this at the time is
that it would probably take 1 man month to do the rewrite, pass the
existing tests and write more tests for the new behaviours and I didn't
have a month free to do it ;) Proper support for the new parser API is
required to properly support System.IO.Packaging, so I'd be willing to
offer any advice if you want to take on the task.
The biggest problem (as I saw it at the time) is that this is an all or
nothing kind of patch. It might be impossible to do this one uri scheme
at a time without making things ridiculously complicated internally.
While the existing code will be useful as a guide, you will end up
chopping it up into tiny pieces and moving it around into the different
parser subclasses.
Alan.
p.s. The above should be mostly accurate, but the last time I looked at
this was when I sent the original email ;)
On Thu, Feb 11, 2010 at 5:09 AM, Miguel de Icaza <miguel at novell.com>
wrote:
Hello,
Some searching also threw up this post to the list back in
October 2008:
http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg18617.ht
ml . I've looked in to the Mono implementation in svn, and it still
appears that most of the Uri class decodes specific Uri content itself
rather than delegating to Uri parsers.
I do not believe we ever moved to that scheme of Uri parsing.
I was wondering if anyone knew if the post above was ever followed up,
or whether the suggestion wasn't implemented for some reason? I guess
this should probably be filed as a bug, as the functionality was added
in .NET 2? If you'd welcome a patch I could probably submit something
based on Alan's suggestion.
I would love to see a patch based on Alan's patch.
It should be simpler these days since Mono trunk has dropped support for
1.0 compatibility
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100212/c599a132/attachment.html
More information about the Mono-devel-list
mailing list