1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix http reader bug, support infinite chunkted. 2.0.209

This commit is contained in:
winlin 2016-01-13 12:44:51 +08:00
parent e2e6e76f92
commit 28080efec8
8 changed files with 160 additions and 23 deletions

8
trunk/src/app/srs_app_http_api.cpp Executable file → Normal file
View file

@ -950,8 +950,12 @@ int SrsHttpApi::process_request(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
int ret = ERROR_SUCCESS;
srs_trace("HTTP %s %s, content-length=%"PRId64"",
r->method_str().c_str(), r->url().c_str(), r->content_length());
SrsHttpMessage* hm = dynamic_cast<SrsHttpMessage*>(r);
srs_assert(hm);
srs_trace("HTTP API %s %s, content-length=%"PRId64", chunked=%d/%d",
r->method_str().c_str(), r->url().c_str(), r->content_length(),
hm->is_chunked(), hm->is_infinite_chunked());
// method is OPTIONS and enable crossdomain, required crossdomain header.
if (r->is_http_options() && _srs_config->get_http_api_crossdomain()) {