mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #158: http-callback check http status code ok(200). 2.0.84
This commit is contained in:
parent
8df0f724d6
commit
9d34820c80
10 changed files with 88 additions and 14 deletions
|
@ -52,7 +52,7 @@ SrsHttpClient::~SrsHttpClient()
|
|||
srs_freep(parser);
|
||||
}
|
||||
|
||||
int SrsHttpClient::post(SrsHttpUri* uri, string req, string& res)
|
||||
int SrsHttpClient::post(SrsHttpUri* uri, string req, int& status_code, string& res)
|
||||
{
|
||||
res = "";
|
||||
|
||||
|
@ -105,6 +105,8 @@ int SrsHttpClient::post(SrsHttpUri* uri, string req, string& res)
|
|||
srs_assert(msg);
|
||||
srs_assert(msg->is_complete());
|
||||
|
||||
status_code = (int)msg->status_code();
|
||||
|
||||
// get response body.
|
||||
if (msg->body_size() > 0) {
|
||||
res = msg->body();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue