mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #319, refine the error code for RAW APi.
This commit is contained in:
parent
11c409688b
commit
06c7ae62ee
2 changed files with 4 additions and 3 deletions
|
@ -930,7 +930,7 @@ int SrsGoApiRaw::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
std::string scope = r->query_get("scope");
|
||||
std::string vhost = r->query_get("vhost");
|
||||
if (scope.empty() || (scope != "global" && scope != "vhost")) {
|
||||
ret = ERROR_SYSTEM_CONFIG_RAW_PARAMS;
|
||||
ret = ERROR_SYSTEM_CONFIG_RAW_NOT_ALLOWED;
|
||||
srs_error("raw api query invalid scope=%s. ret=%d", scope.c_str(), ret);
|
||||
return srs_api_response_code(w, r, ret);
|
||||
}
|
||||
|
@ -988,7 +988,7 @@ int SrsGoApiRaw::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
|||
std::string scope = r->query_get("scope");
|
||||
std::string value = r->query_get("value");
|
||||
if (scope.empty() || (scope != "global.listen" && scope != "global.pid")) {
|
||||
ret = ERROR_SYSTEM_CONFIG_RAW_PARAMS;
|
||||
ret = ERROR_SYSTEM_CONFIG_RAW_NOT_ALLOWED;
|
||||
srs_error("raw api query invalid scope=%s. ret=%d", scope.c_str(), ret);
|
||||
return srs_api_response_code(w, r, ret);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue