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 /res/res_stasis_http_sounds.c | |
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 'res/res_stasis_http_sounds.c')
-rw-r--r-- | res/res_stasis_http_sounds.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/res/res_stasis_http_sounds.c b/res/res_stasis_http_sounds.c index 84fdeeebf..1126cef4b 100644 --- a/res/res_stasis_http_sounds.c +++ b/res/res_stasis_http_sounds.c @@ -81,7 +81,11 @@ static void stasis_http_get_sounds_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 */ is_valid = 1; break; default: @@ -131,7 +135,11 @@ static void stasis_http_get_stored_sound_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 */ is_valid = 1; break; default: |