Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-05-22 12:00:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
948d200ce156c6ad89710fb73c61686926a29d61
948d200c
1 parent
5d7b0edc
fix #400, parse when got entire http header, by feilong. 2.0.164.
显示空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
11 行增加
和
3 行删除
README.md
trunk/src/app/srs_app_http.cpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
948d200
...
...
@@ -562,6 +562,7 @@ Supported operating systems and hardware:
### SRS 2.0 history
*
v2.0, 2015-05-22, for
[
#400
](
https://github.com/simple-rtmp-server/srs/issues/400
)
, parse when got entire http header, by feilong. 2.0.164.
*
v2.0, 2015-05-19, merge from bravo system, add the rtmfp to bms(commercial srs). 2.0.163.
*
v2.0, 2015-05-10, support push flv stream over HTTP POST to SRS.
*
v2.0, 2015-04-20, support ingest hls live stream to RTMP.
...
...
trunk/src/app/srs_app_http.cpp
查看文件 @
948d200
...
...
@@ -1447,10 +1447,17 @@ int SrsHttpParser::parse_message_imp(SrsStSocket* skt)
while
(
true
)
{
ssize_t
nparsed
=
0
;
// when buffer not empty, parse it.
if
(
buffer
->
size
()
>
0
)
{
// when got entire http header, parse it.
// @see https://github.com/simple-rtmp-server/srs/issues/400
char
*
start
=
buffer
->
bytes
();
char
*
end
=
start
+
buffer
->
size
();
for
(
char
*
p
=
start
;
p
<=
end
-
4
;
p
++
)
{
// SRS_HTTP_CRLFCRLF "\r\n\r\n" // 0x0D0A0D0A
if
(
p
[
0
]
==
SRS_CONSTS_CR
&&
p
[
1
]
==
SRS_CONSTS_LF
&&
p
[
2
]
==
SRS_CONSTS_CR
&&
p
[
3
]
==
SRS_CONSTS_LF
)
{
nparsed
=
http_parser_execute
(
&
parser
,
&
settings
,
buffer
->
bytes
(),
buffer
->
size
());
srs_info
(
"buffer=%d, nparsed=%d, header=%d"
,
buffer
->
size
(),
(
int
)
nparsed
,
header_parsed
);
break
;
}
}
// consume the parsed bytes.
...
...
trunk/src/core/srs_core.hpp
查看文件 @
948d200
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 16
3
#define VERSION_REVISION 16
4
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论