Subject: bug in default base URI in "HTTP Header Linking"?

From: Dan Connolly <[email-masked]>
Date: Thu, 19 Jun 2008 10:48:06 -0500

I was a little surprised to read:

If the relationship is a relative URI, its base URI MUST be considered
to be "http://www.iana.org/assignments/link-relations.html#",
 -- http://tools.ietf.org/id/draft-nottingham-http-link-header-01.txt

Is that really what you meant?

If we take this example from the same draft:

       Link: <http://www.cern.ch/TheBook/chapter2>; rel="Previous"

we get:

>>> import urlparse
>>> base="http://www.iana.org/assignments/link-relations.html#"
>>> urlparse.urljoin(base, "Previous")
'http://www.iana.org/assignments/Previous'

Surely that's not by design, right?

p.s. I'm not subscribed to [email-masked], so please
copy me on replies.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
gpg D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

---

From: Julian Reschke <[email-masked]>
Date: Thu, 19 Jun 2008 18:14:11 +0200

Dan Connolly wrote:
> ...

Know issue, see also 
<http://lists.w3.org/Archives/Public/ietf-http-wg/2008JanMar/0543.html>.

BR, Julian

---

From: "Frank Ellermann" <[email-masked]>
Date: Thu, 19 Jun 2008 23:33:52 +0200

> <http://lists.w3.org/Archives/Public/ietf-http-wg/2008JanMar/0543.html>.

Oops, I forgot Mark's draft, sorry.  Background, the MIME subtype
for OpenSearch is still unregistered, and after whining about it
for some months and I finally arrived at the conclusion that this
is a case of <URL:http://en.wikipedia.org/wiki/Template:Sofixit>.

While at it I saw that atom:link rel="search" is also not yet
registered, and that IANA missed the base IRI fine print in
<http://tools.ietf.org/html/rfc4287#section-4.2.7>.  Telling IANA
how to fix this is simple, but it makes no sense to fix it twice.

IOW, are you sure that you want <ifragment>s for the relations ?
IMO the RFC 4287 <ipath> approach is clearer, it just needs to
be implemented.  Here's what I've written in the OpenSearch I-D:

| 3.  IANA Considerations
|
| IANA is asked to create one URL for each registered atom:link
| relation below <http://www.iana.org/assignments/relation/> as
| specified in [RFC4287] section 4.2.7.2.  All existing atom:link
| relation templates should get the corresponding URLs, e.g.,
| "current" at <http://www.iana.org/assignments/relation/current>.
|
| For the remaining registered atom:link relations without template
| the corresponding URLs should redirect to the atom:link relation
| registry, e.g., for "alternate" the URL
| <http://www.iana.org/assignments/relation/alternate> can be
| redirected to the atom:link relation registry.  For consistency
| the URL <http://www.iana.org/assignments/relation/> should be
| used for the atom:link registry.
|
| 3.1.  atom:link rel="search"
|
| Below you find the [RFC4287] registration template for the
| atom:link "search" relation under
| <http://www.iana.org/assignments/relation/>:
[...]

Most points TBD, the opensearch-00 draft is just a skeleton, and
it's perfectly irrelevant *where* the relation registry is fixed,
as long as it's a.s.a.p. and also clear *how* it has to be fixed.

Use <ifragment> as in Mark's draft, or <ipath> as in RFC 4287 ?

How many months do you expect until Mark's draft is ready for a
"PubReq" ?  If it's roughly this year the OpenSearch draft could
simply use Mark's I-D as normative reference (instead of 4287),
and skip the convoluted "relation registry" cleanup business...

 Frank

---

From: Julian Reschke <[email-masked]>
Date: Fri, 20 Jun 2008 10:50:03 +0200

> be implemented.  Here's what I've written in the OpenSearch I-D:

Hm, looking at 
<http://tools.ietf.org/html/draft-nottingham-http-link-header-01>, I 
don't see "ifragment" mentioned anywhere...

<http://tools.ietf.org/html/draft-nottingham-http-link-header-01#section-3> 
says:

        relationship   = URI-Reference |
                       <"> URI-Reference *( SP URI-Reference) <"> )

Are you looking at something else...?

BR, Julian

---

From: "Frank Ellermann" <[email-masked]>
Date: Fri, 20 Jun 2008 12:53:14 +0200

Julian Reschke wrote:
 
> Hm, looking at 
> <http://tools.ietf.org/html/draft-nottingham-http-link-header-01>,
> I don't see "ifragment" mentioned anywhere...

It's in section 3.1:

| Relationship values are URIs that identify the type of link.  If
| the relationship is a relative URI, its base URI MUST be considered
| to be <http://www.iana.org/assignments/link-relations.html#>, and
| the value MUST be present in the link relation registry.

Roughly anything after the first # in an IRI is a <ifragment>.  I
had RFC 4287 atom:link in mind, that talks about IRIs.  Mark's I-D
is for HTTP => URIs, I should have written <fragment>, sorry.

> Are you looking at something else...?

Yes, I'm talking about the IANA link relation registry, not about
the link relation syntax... :-) 

 Frank

---

From: Julian Reschke <[email-masked]>
Date: Fri, 20 Jun 2008 13:25:01 +0200

> is for HTTP => URIs, I should have written <fragment>, sorry.

Aha.

I consider this a bug in Mark's draft. The base URI should IMHO stay the 
same as in RFC4287.

BR, Julian

---

From: "Frank Ellermann" <[email-masked]>
Date: Fri, 20 Jun 2008 13:38:09 +0200

Julian Reschke wrote:
 
> I consider this a bug in Mark's draft. The base URI should
> IMHO stay the same as in RFC4287.

Okay, then he can adapt this part from the OpenSearch draft,
and I can replace 4287 by his draft as normative reference.

 Frank
-- 
    IANA is asked to create one URL for each registered atom:link relation
    below <eref target="http://www.iana.org/assignments/relation/" /> as
    specified in <xref target="RFC4287" /> section 4.2.7.2. All existing
    atom:link relation templates should get the corresponding URLs, e.g.,
    "current" at
    <eref target="http://www.iana.org/assignments/relation/current" />.
</t><t>
    For the remaining registered atom:link relations without template the
    corresponding URLs should redirect to the atom:link relation registry,
    e.g., for "alternate" the URL
    <eref target="http://www.iana.org/assignments/relation/alternate" />
    can be redirected to the atom:link relation registry. For consistency
    the URL <eref target="http://www.iana.org/assignments/relation/" />
    should be used for the atom:link registry.