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
This commit is contained in:
David M. Lee
2013-07-23 14:57:03 +00:00
parent ff2f5eaa23
commit e148c6e867
9 changed files with 243 additions and 50 deletions

View File

@@ -78,7 +78,11 @@ static void stasis_http_get_playback_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:
@@ -128,7 +132,11 @@ static void stasis_http_stop_playback_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:
@@ -184,7 +192,11 @@ static void stasis_http_control_playback_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 */
case 400: /* The provided operation parameter was invalid */
case 404: /* The playback cannot be found */
case 409: /* The operation cannot be performed in the playback's current state */