开发者

Uri.IsWellFormedUriString allows http://http://<url>

开发者 https://www.devze.com 2023-01-17 08:01 出处:网络
This seems strange to me but I am sure there is an explanation If I use Uri.IsWellFormedUriString passing in \"http://http://www.google.com\" it r开发者_如何学Goeturns true, I can only assume that th

This seems strange to me but I am sure there is an explanation

If I use Uri.IsWellFormedUriString passing in "http://http://www.google.com" it r开发者_如何学Goeturns true, I can only assume that this URI conforms to some RFC specification and is valid.

Most of my other tests indicate this method works in the manner in which I expect other than this one

Can anyone advise?


I checked the BNF for a URI in RFC 3296 and it does conform.

It conforms because following the first "http://" is a registry-based naming authority followed by an absolute path. "http:" conforms to the registry-based naming authority, and "//www.google.com" conforms to the absolute path.

0

精彩评论

暂无评论...
验证码 换一张
取 消