正在显示
2 个修改的文件
包含
11 行增加
和
5 行删除
| @@ -132,8 +132,11 @@ bool SrsHttpVhost::can_handle(const char* path, int length, const char** /*pchil | @@ -132,8 +132,11 @@ bool SrsHttpVhost::can_handle(const char* path, int length, const char** /*pchil | ||
| 132 | bool SrsHttpVhost::is_handler_valid(SrsHttpMessage* req, int& status_code, std::string& reason_phrase) | 132 | bool SrsHttpVhost::is_handler_valid(SrsHttpMessage* req, int& status_code, std::string& reason_phrase) |
| 133 | { | 133 | { |
| 134 | std::string fullpath = _dir + "/" + req->match()->unmatched_url; | 134 | std::string fullpath = _dir + "/" + req->match()->unmatched_url; |
| 135 | - if (req->match()->unmatched_url.empty()) { | ||
| 136 | - fullpath += req->match()->matched_url; | 135 | + if (_mount == "/") { |
| 136 | + fullpath = _dir + "/" + req->match()->matched_url; | ||
| 137 | + if (!req->match()->unmatched_url.empty()) { | ||
| 138 | + fullpath += "/" + req->match()->unmatched_url; | ||
| 139 | + } | ||
| 137 | } | 140 | } |
| 138 | 141 | ||
| 139 | if (::access(fullpath.c_str(), F_OK | R_OK) < 0) { | 142 | if (::access(fullpath.c_str(), F_OK | R_OK) < 0) { |
| @@ -152,8 +155,11 @@ int SrsHttpVhost::do_process_request(SrsSocket* skt, SrsHttpMessage* req) | @@ -152,8 +155,11 @@ int SrsHttpVhost::do_process_request(SrsSocket* skt, SrsHttpMessage* req) | ||
| 152 | int ret = ERROR_SUCCESS; | 155 | int ret = ERROR_SUCCESS; |
| 153 | 156 | ||
| 154 | std::string fullpath = _dir + "/" + req->match()->unmatched_url; | 157 | std::string fullpath = _dir + "/" + req->match()->unmatched_url; |
| 155 | - if (req->match()->unmatched_url.empty()) { | ||
| 156 | - fullpath += req->match()->matched_url; | 158 | + if (_mount == "/") { |
| 159 | + fullpath = _dir + "/" + req->match()->matched_url; | ||
| 160 | + if (!req->match()->unmatched_url.empty()) { | ||
| 161 | + fullpath += "/" + req->match()->unmatched_url; | ||
| 162 | + } | ||
| 157 | } | 163 | } |
| 158 | 164 | ||
| 159 | if (srs_string_ends_with(fullpath, "/")) { | 165 | if (srs_string_ends_with(fullpath, "/")) { |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
| 33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
| 34 | -#define VERSION_REVISION "49" | 34 | +#define VERSION_REVISION "50" |
| 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "srs" | 37 | #define RTMP_SIG_SRS_KEY "srs" |
-
请 注册 或 登录 后发表评论