mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine macros of HTTP
This commit is contained in:
parent
198a7f1e9d
commit
573952e2fc
15 changed files with 97 additions and 88 deletions
|
@ -76,13 +76,13 @@ int SrsHttpClient::post(SrsHttpUri* uri, string req, string& res)
|
|||
// POST %s HTTP/1.1\r\nHost: %s\r\nContent-Length: %d\r\n\r\n%s
|
||||
std::stringstream ss;
|
||||
ss << "POST " << uri->get_path() << " "
|
||||
<< "HTTP/1.1" << __CRLF
|
||||
<< "Host: " << uri->get_host() << __CRLF
|
||||
<< "Connection: Keep-Alive" << __CRLF
|
||||
<< "Content-Length: " << std::dec << req.length() << __CRLF
|
||||
<< "User-Agent: " << RTMP_SIG_SRS_NAME << RTMP_SIG_SRS_VERSION << __CRLF
|
||||
<< "Content-Type: text/html" << __CRLF
|
||||
<< __CRLF
|
||||
<< "HTTP/1.1" << __SRS_CRLF
|
||||
<< "Host: " << uri->get_host() << __SRS_CRLF
|
||||
<< "Connection: Keep-Alive" << __SRS_CRLF
|
||||
<< "Content-Length: " << std::dec << req.length() << __SRS_CRLF
|
||||
<< "User-Agent: " << RTMP_SIG_SRS_NAME << RTMP_SIG_SRS_VERSION << __SRS_CRLF
|
||||
<< "Content-Type: text/html" << __SRS_CRLF
|
||||
<< __SRS_CRLF
|
||||
<< req;
|
||||
|
||||
SrsSocket skt(stfd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue