mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user