Re: Preprocessor supported protocols

Hello all,
Sean wrote on Mon, 3 Dec 2007:

>If there is no colon in the URI, assume it is an "http://" URI and
>proceed that way. If there is a colon, parse the part before the colon
>and use that as the protocol.

This is how the default http protocol is implemented in some browsers,
but unfortunately, it is not very smart. It works for simple URIs like
www.example.com, but if you add a port number to it like
www.example.com:81 then www.example.com will be treated as the protocol
and 81 as the host name. Pretty weird.

My proposal would be this little modification:

If there is no colon in the URI before the first dot, assume that it is
an "http://" URI...

(For non-local URIs, there will be always at least one dot, so this
should work for all realistic scenarios. - And sorry for my late
response.)

Cheers
Herwig Feichtinger

Received on Monday, 17 December 2007 14:22:19 UTC