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-01-22 15:05:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dc6299171f76d06e38725d3f9ec72efb6bd42a40
dc629917
1 parent
7d86c6d9
refine http stream code.
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
6 行删除
trunk/src/app/srs_app_http.cpp
trunk/src/app/srs_app_http.cpp
查看文件 @
dc62991
...
...
@@ -305,7 +305,8 @@ int SrsGoHttpFileServer::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
srs_trace
(
"http match file=%s, pattern=%s, upath=%s"
,
fullpath
.
c_str
(),
entry
->
pattern
.
c_str
(),
upath
.
c_str
());
// handle file extension.
// handle file according to its extension.
// use vod stream for .flv/.fhv
if
(
srs_string_ends_with
(
fullpath
,
".flv"
)
||
srs_string_ends_with
(
fullpath
,
".fhv"
))
{
std
::
string
start
=
r
->
query_get
(
"start"
);
if
(
start
.
empty
())
{
...
...
@@ -318,11 +319,10 @@ int SrsGoHttpFileServer::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
}
return
serve_flv_stream
(
w
,
r
,
fullpath
,
offset
);
}
else
{
return
serve_file
(
w
,
r
,
fullpath
);
}
return
ret
;
// serve common static file.
return
serve_file
(
w
,
r
,
fullpath
);
}
int
SrsGoHttpFileServer
::
serve_file
(
ISrsGoHttpResponseWriter
*
w
,
SrsHttpMessage
*
r
,
string
fullpath
)
...
...
@@ -339,8 +339,8 @@ int SrsGoHttpFileServer::serve_file(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
int64_t
length
=
fs
.
filesize
();
// unset the content length in chunked encoding.
//w->header()->set_content_length(length);
// unset the content length to encode in chunked encoding.
w
->
header
()
->
set_content_length
(
length
);
static
std
::
map
<
std
::
string
,
std
::
string
>
_mime
;
if
(
_mime
.
empty
())
{
...
...
请
注册
或
登录
后发表评论