From 0fd76957335da840381fada904819cf2a52ed4ff Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 1 Dec 2016 13:01:07 +0100 Subject: [PATCH] pdu.c: Added missing response phrases Some response phrases were missing in the data structure coap_error that is used to return a humna-readable error description in a diagnostic payload. --- src/pdu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pdu.c b/src/pdu.c index 922266af..2d0ca4be 100644 --- a/src/pdu.c +++ b/src/pdu.c @@ -1,6 +1,6 @@ /* pdu.c -- CoAP message structure * - * Copyright (C) 2010--2014 Olaf Bergmann + * Copyright (C) 2010--2016 Olaf Bergmann * * This file is part of the CoAP library libcoap. Please see * README for terms of use. @@ -284,15 +284,18 @@ error_desc_t coap_error[] = { { COAP_RESPONSE_CODE(203), "Valid" }, { COAP_RESPONSE_CODE(204), "Changed" }, { COAP_RESPONSE_CODE(205), "Content" }, + { COAP_RESPONSE_CODE(231), "Continue" }, { COAP_RESPONSE_CODE(400), "Bad Request" }, { COAP_RESPONSE_CODE(401), "Unauthorized" }, { COAP_RESPONSE_CODE(402), "Bad Option" }, { COAP_RESPONSE_CODE(403), "Forbidden" }, { COAP_RESPONSE_CODE(404), "Not Found" }, { COAP_RESPONSE_CODE(405), "Method Not Allowed" }, + { COAP_RESPONSE_CODE(406), "Not Acceptable" }, { COAP_RESPONSE_CODE(408), "Request Entity Incomplete" }, + { COAP_RESPONSE_CODE(412), "Precondition Failed" }, { COAP_RESPONSE_CODE(413), "Request Entity Too Large" }, - { COAP_RESPONSE_CODE(415), "Unsupported Media Type" }, + { COAP_RESPONSE_CODE(415), "Unsupported Content-Format" }, { COAP_RESPONSE_CODE(500), "Internal Server Error" }, { COAP_RESPONSE_CODE(501), "Not Implemented" }, { COAP_RESPONSE_CODE(502), "Bad Gateway" },