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
|
@ -75,9 +75,10 @@ void SrsHttpHeartbeat::heartbeat()
|
|||
ss << __SRS_JOBJECT_END;
|
||||
std::string data = ss.str();
|
||||
std::string res;
|
||||
int status_code;
|
||||
|
||||
SrsHttpClient http;
|
||||
if ((ret = http.post(&uri, data, res)) != ERROR_SUCCESS) {
|
||||
if ((ret = http.post(&uri, data, status_code, res)) != ERROR_SUCCESS) {
|
||||
srs_info("http post hartbeart uri failed. "
|
||||
"url=%s, request=%s, response=%s, ret=%d",
|
||||
url.c_str(), data.c_str(), res.c_str(), ret);
|
||||
|
@ -85,8 +86,8 @@ void SrsHttpHeartbeat::heartbeat()
|
|||
}
|
||||
|
||||
srs_info("http hook hartbeart success. "
|
||||
"url=%s, request=%s, response=%s, ret=%d",
|
||||
url.c_str(), data.c_str(), res.c_str(), ret);
|
||||
"url=%s, request=%s, status_code=%d, response=%s, ret=%d",
|
||||
url.c_str(), data.c_str(), status_code, res.c_str(), ret);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue