[Mono-devel-list] handling file Uri containing '#'

Duncan Mak duncan at ximian.com
Wed Sep 10 21:51:07 EDT 2003


On Wed, 2003-09-10 at 17:29, Chris Turchin wrote:
> hi guys!
> 
> i looked into this and the Parse(string uriString) seems to be  the
> culprit (line 774 or so):
> 
>                         // 8 fragment
>                         pos = uriString.IndexOf ('#');
>                         if (pos != -1) {
>                                fragment = uriString.Substring (pos);
>                                uriString = uriString.Substring (0, pos);
>                         }
>                                                                                                                                         
> that chops my path at the # character if i understand correctly, but
> why? i don't know much about the rfc's (or what '// 8 fragment' means)

"8 fragment" refers to part 8 as noted in Appendix B, RFC 2396.

> but it seems to  me that  my code is okay (and i just tested  it  with
> framework1.1 and it works)

I'll have to try a sample on Windows, but it seems to me that it is
possible that having a '#' character in your path might not be in fact a
valid URI. But if Microsoft supports it in their implementation, we'll
eventually have to support it. 

I need to go home now, and I don't have time to study RFC 2396 carefully
about this. Please read RFC 2396 and tell me what you think. If I'm
mis-interpreting some part of the spec, please tell me where and I'll
try to fix it...

thanks,

Duncan.



More information about the Mono-devel-list mailing list