google / rust-async-coap

A flexible, asynchronous library for using and serving CoAP resources in Rust.
Apache License 2.0
49 stars 17 forks source link

Update OptionIteratorExt::extract_location to comply with RFC7252 section 5.10.7 #6

Open darconeous opened 5 years ago

darconeous commented 5 years ago

The relevant portion of RFC7252 section 5.10.7 is the last paragraph (emphasis mine):

The options that are used to compute the relative URI-reference are collectively called Location-\* options. Beyond Location-Path and Location-Query, more Location-\* options may be defined in the future and have been reserved option numbers 128, 132, 136, and 140. If any of these reserved option numbers occurs in addition to Location-Path and/or Location-Query and are not supported, then a 4.02 (Bad Option) error MUST be returned.

Currently we are ignoring options 128, 132, 136, and 140. This must be fixed to be in compliance with RFC7252.