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-03-11 14:55:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1ad0c847cef672236b6e9b8e858d9957366dcf73
1ad0c847
1 parent
f247ac9d
fix http parse bug
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
11 行增加
和
11 行删除
trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate
trunk/src/app/srs_app_http.cpp
trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate
查看文件 @
1ad0c84
不能预览此文件类型
trunk/src/app/srs_app_http.cpp
查看文件 @
1ad0c84
...
...
@@ -1315,17 +1315,6 @@ int SrsHttpParser::parse_message_imp(SrsStSocket* skt)
srs_info
(
"buffer=%d, nparsed=%d, body=%d"
,
buffer
->
size
(),
(
int
)
nparsed
,
body_parsed
);
}
// when nothing parsed, read more to parse.
if
(
nparsed
==
0
)
{
// when requires more, only grow 1bytes, but the buffer will cache more.
if
((
ret
=
buffer
->
grow
(
skt
,
buffer
->
size
()
+
1
))
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"read body from server failed. ret=%d"
,
ret
);
}
return
ret
;
}
}
// consume the parsed bytes.
if
(
nparsed
&&
nparsed
-
body_parsed
>
0
)
{
buffer
->
read_slice
(
nparsed
-
body_parsed
);
...
...
@@ -1336,6 +1325,17 @@ int SrsHttpParser::parse_message_imp(SrsStSocket* skt)
if
(
state
==
SrsHttpParseStateHeaderComplete
||
state
==
SrsHttpParseStateMessageComplete
)
{
break
;
}
// when nothing parsed, read more to parse.
if
(
nparsed
==
0
)
{
// when requires more, only grow 1bytes, but the buffer will cache more.
if
((
ret
=
buffer
->
grow
(
skt
,
buffer
->
size
()
+
1
))
!=
ERROR_SUCCESS
)
{
if
(
!
srs_is_client_gracefully_close
(
ret
))
{
srs_error
(
"read body from server failed. ret=%d"
,
ret
);
}
return
ret
;
}
}
}
// parse last header.
...
...
请
注册
或
登录
后发表评论