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

Merge branch '4.0release' into develop

This commit is contained in:
winlin 2022-09-03 22:12:46 +08:00
commit 424713a31d
3 changed files with 6 additions and 2 deletions

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 260
#define VERSION_REVISION 261
#endif

View file

@ -76,6 +76,8 @@ srs_error_t SrsHttpParser::parse_message(ISrsReader* reader, ISrsHttpMessage** p
p_body_start = p_header_tail = NULL;
// We must reset the field name and value, because we may get a partial value in on_header_value.
field_name = field_value = "";
// Reset the url.
url = "";
// The header of the request.
srs_freep(header);
header = new SrsHttpHeader();
@ -220,7 +222,8 @@ int SrsHttpParser::on_url(http_parser* parser, const char* at, size_t length)
srs_assert(obj);
if (length > 0) {
obj->url = string(at, (int)length);
// Note that this function might be called for multiple times, and we got pieces of content.
obj->url.append(at, (int)length);
}
// When header parsed, we must save the position of start for body,