Opened 11 years ago

Closed 11 years ago

#194 closed protocol enhancement (fixed)

Rules for determining the context of a link relation

Reported by: zach@… Owned by: zach@…
Priority: minor Milestone:
Component: link-format Version:
Severity: - Keywords:


From the review by Julian Reschke:

The current explanation of how context is determined for a link relation is awkward as it is paragraph form. This ticket proposes expansion and clarification of these rules for determining the context as a step-by-step list.

The current text says:

" this information in the target URI, the context URI is built from the

scheme and authority that was used for referencing the resource
returning the set of links, replacing the path with an empty path.

Thus by default links can be thought of as describing a target
resource hosted by the server. Other relations can be expressed by
including an anchor parameter (which defines the context URI) along
with an explicit relation parameter. This is an important difference
to the way the HTTP Link Header format is used, as it is included in
the header of an HTTP response for some URI (this URI is by default
the context URI). Thus the HTTP Link Header is by default relating
the target URI to the URI that was requested. In comparison, the
CoRE link format includes one or more links, each describing a
resource hosted by a server by default. Other relations can be
expressed by using the anchor parameter. See Section 5 of [RFC3986]
for a description of how URIs are constructed from URI references."

An alternative explanation for the context rules would be:

The context URI specified by

a) the anchor parameter, when specified, or

b) Origin of the target URI, when specified

c) Origin of the link format document's base URI.

It also should be explained why only the origin is used in cases b) or c).

In addition, in Section 2.2 it says:

"The "hosts" relation type indicates that the target URI is a resource

hosted by the server given by the base URI, or, if present, the
anchor parameter."

With the new context rules this will be generalized, and the context is determined like that regardless of the relation type.

Change History (1)

comment:1 Changed 11 years ago by zach@…

  • Resolution set to fixed
  • Status changed from new to closed


Note: See TracTickets for help on using tickets.