diff options
author | David M. Lee <dlee@digium.com> | 2013-07-23 14:57:03 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-07-23 14:57:03 +0000 |
commit | e148c6e867540675d1f26e54fa91b3497d0e8b6f (patch) | |
tree | bac4f4eb0e2c94ed2b3d5834d2826096ac235553 /rest-api-templates | |
parent | ff2f5eaa230651d3fd5e603ab31c281fe7c6a517 (diff) |
No more teapots.
Now that the ARI implementation is nearing some definition of
completeness, we should properly respond with 501's for unimplemented
functionality, instead of the almost humorous 418.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api-templates')
-rw-r--r-- | rest-api-templates/res_stasis_http_resource.c.mustache | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rest-api-templates/res_stasis_http_resource.c.mustache b/rest-api-templates/res_stasis_http_resource.c.mustache index d35873258..4eda1c5fa 100644 --- a/rest-api-templates/res_stasis_http_resource.c.mustache +++ b/rest-api-templates/res_stasis_http_resource.c.mustache @@ -78,7 +78,11 @@ static void stasis_http_{{c_nickname}}_cb( code = response->response_code; switch (code) { - case 500: /* Internal server error */ + case 0: /* Implementation is still a stub, or the code wasn't set */ + is_valid = response->message == NULL; + break; + case 500: /* Internal Server Error */ + case 501: /* Not Implemented */ {{#error_responses}} case {{code}}: /* {{{reason}}} */ {{/error_responses}} |