mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #442: HTTP API kickoff client.
This commit is contained in:
parent
0e3128d3e3
commit
e8c0ca7af0
10 changed files with 121 additions and 18 deletions
12
trunk/src/protocol/srs_http_stack.cpp
Normal file → Executable file
12
trunk/src/protocol/srs_http_stack.cpp
Normal file → Executable file
|
@ -246,7 +246,17 @@ SrsHttpRedirectHandler::~SrsHttpRedirectHandler()
|
|||
int SrsHttpRedirectHandler::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
// TODO: FIXME: implements it.
|
||||
string msg = "Moved Permsanently";
|
||||
|
||||
w->header()->set_content_type("text/plain; charset=utf-8");
|
||||
w->header()->set_content_length(msg.length());
|
||||
w->header()->set("Location", url);
|
||||
w->write_header(code);
|
||||
|
||||
w->write((char*)msg.data(), (int)msg.length());
|
||||
w->final_request();
|
||||
|
||||
srs_info("redirect to %s.", url.c_str());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue