W3C home > Mailing lists > Public > uri@w3.org > February 2004

RFC2396, parsing 'authority' and 'host'

From: Graham Klyne <GK@ninebynine.org>
Date: Mon, 02 Feb 2004 13:13:22 +0000
Message-Id: <5.1.0.14.2.20040202130742.00bd2a10@127.0.0.1>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: uri@w3.org

I just found a bug in my URI parsing code that leads me to suggest a minor 
revision to the syntax in RFC2396bis:  (taken from CVS revision 1.64, from 
http://cvs.apache.org/viewcvs.cgi/ietf-uri/rev-2002/)

My error was that I overlooked the square brackets in the host production.

Currently:

   authority   = [ userinfo "@" ] host [ ":" port ]
and
   host        = [ IPv6reference / IPv4address / hostname ]

My suggestion is for:

   authority   = [ userinfo "@" ] [ host ] [ ":" port ]
and
   host        = IPv6reference / IPv4address / hostname

As well as being less easy to overlook the fact that host is optional, I 
found it (marginally) easier to code this way.

But if you have good reasons for it being the way it is, then that's fine 
by me.  This was, after all, my mistake.

#g


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
Received on Monday, 2 February 2004 08:44:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:07 UTC