W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > December 2007

Re: Preprocessor supported protocols

From: Herwig Feichtinger <hf@isdn-capi.de>
Date: Mon, 17 Dec 2007 15:03:04 +0100 (CET)
Message-ID: <34070654121133@shamrock>
To: public-mobileok-checker@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:04 GMT