Closed EskoDijk closed 5 years ago
Thanks,
these options are removed.
Peter Esko Dijk schreef op 2019-01-30 11:39:
Appendices examples use Uri-Host, however this is normally never included in a CoAP request. See RFC7252 Section 5.10.1 (around the middle). The default host is the target server being contacted via DTLS, so there's no need at all to include it. Standard CoAP libraries don't generate it. Including this in examples will only confuse the reader.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
[1] https://github.com/SanKumar2015/EST-coaps/issues/115 [2] https://github.com/notifications/unsubscribe-auth/AMWTQfXFVGSuifaMTq0x7SqtzkHAeFKgks5vIXZVgaJpZM4aZ61W
There are usecases for the Uri-Host. Keeping it in an example while we make sure we explain it is not a mandatory option will not cause issues.
Agree, although - because normally Uri-Host is not used in CoAP - the example text has to clearly explain why Uri-Host is required or beneficial in the specific example. In the -07 draft example, it was not clear why including Uri-Host was useful to the server to aid in processing of the request, since the client was sending the default value "192.0.2.1" over the wire - which normally gets automatically removed by a CoAP stack because it is default i.e. the server already knows this value because its UDP endpoint is bound to that address. One suggestion is to use a symbolic host name e.g. "estserver.example.com" which could be in some cases used by the server to aid in the processing of the request, e.g. if it has multiple virtual EST servers or registrar it can pick the right one.
see Uri_Port
Fixed by including non standard port in the uri-port and an FQDN on the uri-host.
Options Option (Uri-Host) [optional] Option Delta = 0x3 (option# 3) Option Length = 0x9 Option Value = est-coaps.example.ietf.org Option (Uri-Port) [optional] Option Delta = 0x4 (option# 3+4=7) Option Length = 0x4 Option Value = 9085
And adding a paragraph to explain these to options
The Uri-Host and Uri-Port options are optional. They are usually omitted as the DTLS destination and port are sufficient. Explicit Uri-Host and Uri-Port options are typically used when an endpoint hosts multiple virtual servers and uses the options to route the requests accordingly. Alternatively, if a UDP port to a server is blocked, someone could send the DTLS packets to a known open port on the server and use the Uri-Port to convey the intended port he is attempting to reach.
Commit 9562629
Appendices examples use Uri-Host, however this is normally never included in a CoAP request. See RFC7252 Section 5.10.1 (around the middle). The default host is the target server being contacted via DTLS, so there's no need at all to include it. Standard CoAP libraries don't generate it. Including this in examples will only confuse the reader.