Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inclusion of "anchor" attribute in link is unnecessary in many examples #281

Closed
EskoDijk opened this issue Oct 12, 2020 · 3 comments
Closed

Inclusion of "anchor" attribute in link is unnecessary in many examples #281

EskoDijk opened this issue Oct 12, 2020 · 3 comments
Assignees
Labels

Comments

@EskoDijk
Copy link

@EskoDijk EskoDijk commented Oct 12, 2020

In many examples, the "anchor" attribute is included if the target URI of the link is an absolute URI. For example like below:

<coap://new.example.com:5684/sensors/temp>;ct=41;
    rt="temperature-c";if="sensor";
    anchor="coap://new.example.com:5684/",

Here the anchor is not needed because the origin of the target URI already specifies the context/anchor; per RFC 6690 https://tools.ietf.org/html/rfc6690#section-2.1 rule (b) .

For constrained devices and networks it is very important to minimize the payload sizes where possible, so I think the RD SHOULD in this case return the most efficient form possible by leaving out the anchor parameter per link where this is unnecessary to include.

New proposed text of above example:

<coap://new.example.com:5684/sensors/temp>;ct=41;
    rt="temperature-c";if="sensor",

And similar changes to be made for other examples.
Also I'd like to note that including the anchor additionally with the same information seems strange, given that the "hosts" relation type was defined as it is to get rid of the anchor in most cases - serving the needs of constrained systems.

@chrysn chrysn added the examples label Nov 2, 2020
@chrysn
Copy link
Member

@chrysn chrysn commented Nov 2, 2020

Result of the last interim's discussion was that yes we can go ahead with this (after checking through the implementations list again and making the adequate changes to the text).

I'm holding off the other "examples" fixes (#293, #286, #284, #283) for then to keep the diffs more readable.

@chrysn chrysn self-assigned this Nov 2, 2020
@chrysn
Copy link
Member

@chrysn chrysn commented Feb 18, 2021

For my reference, what needs checking is the list at https://mailarchive.ietf.org/arch/msg/core/D_kuIq6QoBZ86FNniN7G_6d1Rtg against the current understanding.

chrysn pushed a commit that referenced this issue Feb 19, 2021
… requirement

This came from the "anchor sets the base URI for the rest"
interpretation that is rejected as per the changelog entries and [281].

[281]: #281
@chrysn chrysn mentioned this issue Feb 19, 2021
3 tasks
@chrysn
Copy link
Member

@chrysn chrysn commented Feb 22, 2021

Fixed in eb62d31

@chrysn chrysn closed this Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants