Description
When I unsubscribe from notifications using await client.cancelObserveProactive(obs), the CoAP UDP packet, which is sent, includes the Uri-Host and Uri-Path options twice.
Steps to Reproduce
- Run the
get_observe_async example
- Check the options of the packet, which is sent after calling
await client.cancelObserveProactive(obs)
Expected Result
Every option is present once. Like this:
- Uri-Host: californium.eclipseprojects.io
- Uri-Path: obs
- Observe: 1
Actual Result
Uri-Host and Uri-Path are duplicated. Like this:
- Uri-Host: californium.eclipseprojects.io
- Uri-Path: obs
- Uri-Host: californium.eclipseprojects.io
- Uri-Path: obs
- Observe: 1
Debugging Observations
It looks like this is somehow caused by the interaction between CoapObserveClientRelation.cancellation() copying the full options of the request packet (which include the Uri-Host and Uri-Path) and CoapResponse.getAllOptions() adding the Uri-Host and Uri-Path aswell