-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Uri] Uri does no accept mailto protcoll with multiple recipients #30300
Comments
This is a known limitation with System.Uri. |
Triage: Uri is already complex and messy. We need to redo and clean it, before we can add new parsing code path into it ... |
@LokiMidgard
Another thing to consider is Uri equality. It is documented that we ignore the UserInfo part, but that might not be obvious when dealing with MailTo uris - personally I find it nonsensical. Currently: Uri foo = new Uri("mailto:foo@domain");
Uri bar = new Uri("mailto:bar@domain");
Console.WriteLine(foo == bar); // true What would we return in the case of multiple addresses (multiple hosts)? |
Agreed, looks like |
I tried to used some WinRT API that only accepted URI's. It's some time ago, I need to look what I actually tried to call. |
I have tried to work with Windows.System.Launcher.LaunchUriAsync I now use I'm writing a Win32 app that is packaged. I'm not sure if this workaround would work for UWP apps. I also have looked at the documentation and was not able to find any part that said some valid uri's are not supported. Either it is not there or I did not recognize it. I would expect a note box at the beginning of remarks that says "not every valid uri is supported" or better listing what uri's do not work. Up to now I normaly used Maybe that was also the case with the WinRT API. |
@MihaZupan to answer your question. What I wan't is to give a method that accepts only 'Uri' objects an "valid" input for that method. But it seems to be more complicated ¬_¬ If
The To have host, port and userinfo which is defined in
Of course changing the current behavior would probably break everyone that is currently using Still the problem I head persists. From my perspective there seems to be two approaches that do not break everyone and helps everyone who uses
The later will probably not break anyone because But the first approach could also fix the same problem with other methods that require |
@LokiMidgard please note that WinRT APIs are part of Windows OS and have nothing to do with .NET. The closest thing we do is that we map the native
I am not convinced the effort is worth the benefit. It would create second implementation for very rare scenario of multiple user addresses. |
I though about editing the docs. But I'm not sure how to phrase it correctly. So I create an issue in the documentation reposetory. I also would like to open an issue for |
Visual Studio is not the right avenue either. I don't know if there is any way to report issues for WinRT APIs or their docs. Closing as there is nothing left to work on here. Thanks! |
Trying to create following Uri
new Uri("mailto:[email protected],[email protected]")
will result in an ExceptionSystem.UriFormatException: 'Invalid URI: The hostname could not be parsed.'
.If I understand RFC 6068 correctly, You should be able to splitt multiple addresses with a
,
The text was updated successfully, but these errors were encountered: