🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82892

Re: Cleanfeed question - HTTP type URLs

#82892
From: D. Stussy
Date: Mon, 08 Mar 2010 00:36
71 lines
4380 bytes
"Matija Nalis" <mnalis-news@voyager.hr> wrote in message
news:slrnhp82vn.dgn.mnalis-news@eagle102.home.lan...
> On Wed, 3 Mar 2010 16:36:24 -0800, D. Stussy
<spam+newsgroups@bde-arc.ampr.org> wrote:
> > http://127.0.0.1/ technically isn't valid.  http://[127.0.0.1]/ is.
>
> Hmm, I would not agree.
>
> My reading of RFC3986 [STD0066] section 3.2.2. is that "host" part of the
> URI is that that only IPv6 ("and later") address literals are bracketed
in
> "[]", and that IPv4 address literals are not.
>
> So http://127.0.0.1/ *is* technically valid, while http://[127.0.0.1]/ is
*not*.
>
> Or do you have some other insights ?

Yes.  When IPv4 addresses take the place of a domain name, they need to be
bracketed.  Such is true for other things such as mailboxes, the HELO
parameter in SMTP, etc.,....

I agree that many implementations accept the unbracketed form, but that
doesn't mean it's correct.

The syntax for RFC 3986 for "IP-literal" is wrong.  It should be:

  IP-literal = "[" ( IPv4address / IPv6address / IPvFuture  ) "]"

Citations:
 - RFC 3696, Section 3: "The domain name can also be replaced by an IP
address in square brackets, ..."
 - RFC 2821, Section 4.1.3 (Repeated in 5321, same section): "For IPv4
addresses, this form uses four small decimal integers separated by dots and
enclosed by brackets such as ..."

A "mailto:" URI is a subset of all URIs, and as such, they are required to
have bracketed IP-address literals (from the various SMTP RFCs cited above)
since they are the textual union of a "mailto:" string with a valid mailbox
address.  Therefore, the general syntax for URIs must accept this form (a
bracketed IPv4 address), and that's my proof that RFC 3986's syntax
specification is wrong.

The reference to the required bracketing of IPv6 addresses is because they
contain colons, which is also the port specification separator, and thus
bracketing is required to avoid ambiguity.  Although there is no such
ambiguity for IPv4, RFC 3986 itself starts section 3.2.2 ("Host") with:

       "The host subcomponent of authority is identified by an IP literal
       encapsulated within square brackets, ..."

Although it further states, "an IPv4 address in dotted-decimal form," such
need not be a list of alternatives.  In English diction and style, such
could be equal to a parenthetical clause which may be expressed using
parentheses except for stress.  However, I grant you that the section
further lists the following syntax:

      host        = IP-literal / IPv4address / reg-name

However, we already know that RFC 3986 has introduced syntactical errors
into the overall URI scheme as such syntax will NOT work for the "mailto"
scheme.  The RFC authors are additionally wrong when they say that IPv6
address literals may be distinguished from IPv4 literals by the presence of
the brackets.  The brackets do not identify the address literal as IPv6 but
merely as some type of address literal and are necessary for removal of
parsing ambiguity from the ":" port separator.  Notice in their RFC
citations, they FAIL to mention any RFC that requires bracketed IP address
literals, yet their syntax encompasses such schemes which require such
(from other RFCs).

Technical Details
Message-ID: <hn1grt$t4r$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.snarked.org!not-for-mail
References: <hmmvaq$kfh$1@snarked.org> <slrnhp82vn.dgn.mnalis-news@eagle102.home.lan>

Show Full Headers
Complete Article Headers
Message-ID: <hn1grt$t4r$1@snarked.org>
Subject: Re: Cleanfeed question - HTTP type URLs
Date: Sun, 7 Mar 2010 16:36:22 -0800
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org>
References: <hmmvaq$kfh$1@snarked.org> <slrnhp82vn.dgn.mnalis-news@eagle102.home.lan>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 71
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-118-48-27.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1268008637 29851 71.118.48.27 (8 Mar 2010 00:37:17 GMT)
X-Complaints-To: newsmaster+complaints@snarked.org
NNTP-Posting-Date: Mon, 8 Mar 2010 00:37:17 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478