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

View file

@ -156,9 +156,6 @@ typedef std::pair<std::string, std::string> SrsHttpHeaderField;
// The field semantics differ slightly between client and server
// usage. In addition to the notes on the fields below, see the
// documentation for Request.Write and RoundTripper.
/**
* the http message, request or response.
*/
class SrsHttpMessage : public ISrsHttpMessage
{
private:
@ -183,6 +180,10 @@ private:
* whether the body is chunked.
*/
bool chunked;
/**
* whether the body is infinite chunked.
*/
bool infinite_chunked;
/**
* whether the request indicates should keep alive
* for the http connection.
@ -235,6 +236,11 @@ public:
* whether body is chunked encoding, for reader only.
*/
virtual bool is_chunked();
/**
* whether body is infinite chunked encoding.
* @remark set by enter_infinite_chunked.
*/
virtual bool is_infinite_chunked();
/**
* whether should keep the connection alive.
*/
@ -255,6 +261,8 @@ public:
* get the RESTful matched id.
*/
virtual int parse_rest_id(std::string pattern);
public:
virtual int enter_infinite_chunked();
public:
/**
* read body to string.