1
0
Fork 0
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:
winlin 2014-07-20 13:33:21 +08:00
parent 198a7f1e9d
commit 573952e2fc
15 changed files with 97 additions and 88 deletions

View file

@ -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);