正在显示
2 个修改的文件
包含
1 行增加
和
6 行删除
| @@ -46,6 +46,7 @@ using namespace std; | @@ -46,6 +46,7 @@ using namespace std; | ||
| 46 | #include <srs_kernel_consts.hpp> | 46 | #include <srs_kernel_consts.hpp> |
| 47 | #include <srs_app_server.hpp> | 47 | #include <srs_app_server.hpp> |
| 48 | #include <srs_protocol_amf0.hpp> | 48 | #include <srs_protocol_amf0.hpp> |
| 49 | +#include <srs_protocol_utility.hpp> | ||
| 49 | 50 | ||
| 50 | int srs_api_response_jsonp(ISrsHttpResponseWriter* w, string callback, string data) | 51 | int srs_api_response_jsonp(ISrsHttpResponseWriter* w, string callback, string data) |
| 51 | { | 52 | { |
| @@ -345,12 +345,6 @@ int SrsHttpResponseReader::read(char* data, int nb_data, int* nb_read) | @@ -345,12 +345,6 @@ int SrsHttpResponseReader::read(char* data, int nb_data, int* nb_read) | ||
| 345 | return ret; | 345 | return ret; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | - // for some server, content-length is -1, while not chunked, directly read | ||
| 349 | - // everything as body. | ||
| 350 | - if (owner->content_length() == -1 && !owner->is_chunked()) { | ||
| 351 | - return read_specified(data, nb_data, nb_read); | ||
| 352 | - } | ||
| 353 | - | ||
| 354 | // chunked encoding. | 348 | // chunked encoding. |
| 355 | if (owner->is_chunked()) { | 349 | if (owner->is_chunked()) { |
| 356 | return read_chunked(data, nb_data, nb_read); | 350 | return read_chunked(data, nb_data, nb_read); |
-
请 注册 或 登录 后发表评论