Am Mittwoch 14 März 2007 03:08 schrieb Jason Kohles: > On Mar 13, 2007, at 11:35 AM, Mario Minati wrote: > > With Regex::Common I found some address that still validate but > > which are not > > valid, at least I've never seen addresses like them: > > > > https://minati.de./ > > (the point after 'de' shouldn't be valid) > > Yes it is, all hostnames actually end with a . (the DNS root), but > nobody requires you > to enter it since they all end with one. There are instances where > you DO want to > include it though. For example if your DNS search order includes > 'foo.com', and you > type into your web browser http://www/ it takes you to http:// > www.foo.com/, but what > happens if your DNS server search order includes foo.com and you have > a host > named minati.de.foo.com? Will you go to minati.de or to > minati.de.foo.com? To > make sure you get just minati.de and not minati.de.foo.com you can use > http://minati.de./ > > > On the other hand this url > > https://minati.de/index.html#lkj > > is invalid, but that might be some trubble with the '#' and the > > encoding. > > (I'm fighting with utf-8 at the moment, do you have experience in > > that Carl?) > > From 'RFC Uniform Resource Identifiers (URI): Generic Syntax' > > 2.4.3. Excluded US-ASCII Characters > > Although they are disallowed within the URI syntax, we include > here a > description of those US-ASCII characters that have been excluded and > the reasons for their exclusion. > > ... snip ... > > The character "#" is excluded because it is used to delimit a URI > from a > fragment identifier in URI references (Section 4). > > Your URI isn't valid unless you encode the #
Thank you Jason, so I was only looking at it from my practical experience not from the theory behind it. And I thought the fragment was also part of what Regex::Common URI matches. I just checked and probably mixed something up when reading the source last time. So this brings me back to my problem to find a constrain that handles the http webadresses a user could type. For me that should include the fragment and doesn't need necessarily the https? scheme. For now I would suggest to make a custom Constraint out of it which doesn't need to be part of the main formfu distribution. What do you think Carl? Greets, Mario _______________________________________________ Html-widget mailing list Html-widget@lists.rawmode.org http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget