Anjay icon indicating copy to clipboard operation
Anjay copied to clipboard

invalid critical option in query 0.03 Put: 3

Open Spongman opened this issue 2 years ago • 1 comments

I'm seeing this error when my server sends a Uri-Host option in a PUT query to a connected Anjay client.

2023-10-25 17:37:56.465075 DEBUG [coap] [./Anjay/deps/avs_coap/src/avs_coap_ctx.c:464]: warning: invalid critical option in query 0.03 Put: 3

I see no justification for this error in rfc7252.

Spongman avatar Oct 25 '23 17:10 Spongman

RFC 7252, section 5.4.1, says:

Unrecognized options of class "critical" that occur in a Confirmable request MUST cause the return of a 4.02 (Bad Option) response.

Uri-Host is a critical option, as you can see in Table 4 in the said RFC.

The only critical options recognized by Anjay are Uri-Path, Uri-Query, Accept, and, if block transfer support is enabled at compile time, Block1 and Block2. There is no code that would handle Uri-Host in any way, so the library must reject requests that contain it, as per the RFC.

May I ask what is the server that sends the Uri-Host option? Is there any specific reason for it to do so?

kFYatek avatar Oct 26 '23 11:10 kFYatek