Re: URIs vs. half-baked URIs



On Thu, Aug 02, 2001 at 11:01:41PM +0100, Sander Vesik wrote:

How about a function that verified that a given string is a propely
encoded URI?

On Thu, 2 Aug 2001, Daniel Veillard wrote:

  Theorically it doesn't work, you don't know if the % was intentional
or not. Okay if you have % and exactly 2 numbers (arabic) then there is
a high probability it is already escaped. But it's an heuristic at best.

On Friday, August 3, 2001, at 06:02  AM, Sander Vesik wrote:

I have been living under the impression that there was an rfc that
specified how URIs/URLs were supposed to look like and that it allowed for
no unescaped %-s...

Yes, that's correct. And you could make a function that would reject URIs that are not properly encoded. But I'm not sure how having this function would solve the problem of programs that make fake URIs and don't do encoding.

As Daniel points out, some non-encoded URIs just happen to look just like real URIs, only they point at a different location. For example, if I have a file named "%23" and you make a bad URI for it: "file:///home/darin/%23"
 it looks exactly the same as a properly encoded URI for a file named "#".

    -- Darin




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]