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-18 17:02:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1393ee43fb7e5397ca1c8b343b8d290bcae6c65
f1393ee4
1 parent
398b212b
for bug #277, use http not found when no file.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
1 行删除
trunk/src/app/srs_app_http.cpp
trunk/src/app/srs_app_http.hpp
trunk/src/app/srs_app_http.cpp
查看文件 @
f1393ee
...
...
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef SRS_AUTO_HTTP_PARSER
#include <stdlib.h>
#include <sys/stat.h>
using
namespace
std
;
#include <srs_kernel_error.hpp>
...
...
@@ -294,6 +294,14 @@ int SrsGoHttpFileServer::serve_http(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
}
else
{
fullpath
+=
upath
;
}
// stat current dir, if exists, return error.
struct
stat
st
;
if
(
stat
(
fullpath
.
c_str
(),
&
st
)
!=
0
)
{
srs_warn
(
"http miss file=%s, pattern=%s, upath=%s"
,
fullpath
.
c_str
(),
entry
->
pattern
.
c_str
(),
upath
.
c_str
());
return
SrsGoHttpNotFoundHandler
().
serve_http
(
w
,
r
);
}
srs_trace
(
"http match file=%s, pattern=%s, upath=%s"
,
fullpath
.
c_str
(),
entry
->
pattern
.
c_str
(),
upath
.
c_str
());
...
...
trunk/src/app/srs_app_http.hpp
查看文件 @
f1393ee
...
...
@@ -265,6 +265,7 @@ public:
class
SrsGoHttpServeMux
{
private
:
// the pattern handler.
std
::
map
<
std
::
string
,
SrsGoHttpMuxEntry
*>
entries
;
// the vhost handler.
std
::
map
<
std
::
string
,
ISrsGoHttpHandler
*>
vhosts
;
...
...
请
注册
或
登录
后发表评论