Dijk, Esko
2017-01-31 15:29:08 UTC
Dear all,
the following question came up in a system design that uses CoAP. What if a client asks for a resource (e.g. using query arguments) that would get prohibitively large, such that the server can't serve it? Looking at CoAP code 4.13 (Request Entity Too Large ; or in updated HTTP jargon "Payload Too Large" per https://tools.ietf.org/html/rfc7231#section-6.5.11 ); it seems to only pertain to the request payload size - not the response payload size. In both the HTTP and CoAP cases. So it seems unsuitable for the situation I describe above.
4.00 Bad Request seems unsuitable because the syntax / formatting of the CoAP request is fine. 5.00 seems possible if we take the perspective that it is the server's fault that it cannot produce the requested (large) response payload.
Some background discussion is also on http://stackoverflow.com/questions/15192477/http-status-code-when-single-request-asks-for-too-large-resource-or-too-many-of which suggests to use 403 / 4.03 for this case. Which seems not ideal as well because it tells the client that its authorization is insufficient which is not the case here.
Does anyone have a view on this?
best regards
Esko Dijk
________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
the following question came up in a system design that uses CoAP. What if a client asks for a resource (e.g. using query arguments) that would get prohibitively large, such that the server can't serve it? Looking at CoAP code 4.13 (Request Entity Too Large ; or in updated HTTP jargon "Payload Too Large" per https://tools.ietf.org/html/rfc7231#section-6.5.11 ); it seems to only pertain to the request payload size - not the response payload size. In both the HTTP and CoAP cases. So it seems unsuitable for the situation I describe above.
4.00 Bad Request seems unsuitable because the syntax / formatting of the CoAP request is fine. 5.00 seems possible if we take the perspective that it is the server's fault that it cannot produce the requested (large) response payload.
Some background discussion is also on http://stackoverflow.com/questions/15192477/http-status-code-when-single-request-asks-for-too-large-resource-or-too-many-of which suggests to use 403 / 4.03 for this case. Which seems not ideal as well because it tells the client that its authorization is insufficient which is not the case here.
Does anyone have a view on this?
best regards
Esko Dijk
________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.