Summary: | ASTERISK-21971: POST to /stasis/bridges/?type=[bridgetype] fails silently | ||
Reporter: | Matt Jordan (mjordan) | Labels: | Asterisk12 |
Date Opened: | 2013-06-27 18:20:56 | Date Closed: | 2013-07-15 09:08:33 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/Stasis Resources/res_ari |
Versions: | 12 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | POSTing the URI {{/stasis/bridges/?type=holding}} will fail silently.
It appears the reason is because {{/stasis/}} matches a URI handler in {{main/http.c}} and calls the callback registered by stasis, but stasis doesn't actually handle the POST (because it doesn't actually match a valid URI) and fails silently. Note that some libraries will, at this point, switch to a GET, which will return data, causing some very odd behavior - instead of making a new bridge you get a listing of all existing bridges. | ||
Comments: | By: Matt Jordan (mjordan) 2013-06-27 19:12:35.107-0500 Per David's investigation, we actually are responding with a "302 Found" to the POST request. Quoting him here: {quote} Note: RFC 1945 and RFC 2068 specify that the client is not allowed to change the method on the redirected request. However, most existing user agent implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original request method. {quote} By: David M. Lee (dlee) 2013-07-15 09:08:25.823-0500 Fixed in r393083. |