mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of http, change to 0.9.50
This commit is contained in:
parent
c5d3b11a6e
commit
ced050829e
2 changed files with 11 additions and 5 deletions
|
@ -132,8 +132,11 @@ bool SrsHttpVhost::can_handle(const char* path, int length, const char** /*pchil
|
||||||
bool SrsHttpVhost::is_handler_valid(SrsHttpMessage* req, int& status_code, std::string& reason_phrase)
|
bool SrsHttpVhost::is_handler_valid(SrsHttpMessage* req, int& status_code, std::string& reason_phrase)
|
||||||
{
|
{
|
||||||
std::string fullpath = _dir + "/" + req->match()->unmatched_url;
|
std::string fullpath = _dir + "/" + req->match()->unmatched_url;
|
||||||
if (req->match()->unmatched_url.empty()) {
|
if (_mount == "/") {
|
||||||
fullpath += req->match()->matched_url;
|
fullpath = _dir + "/" + req->match()->matched_url;
|
||||||
|
if (!req->match()->unmatched_url.empty()) {
|
||||||
|
fullpath += "/" + req->match()->unmatched_url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (::access(fullpath.c_str(), F_OK | R_OK) < 0) {
|
if (::access(fullpath.c_str(), F_OK | R_OK) < 0) {
|
||||||
|
@ -152,8 +155,11 @@ int SrsHttpVhost::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
std::string fullpath = _dir + "/" + req->match()->unmatched_url;
|
std::string fullpath = _dir + "/" + req->match()->unmatched_url;
|
||||||
if (req->match()->unmatched_url.empty()) {
|
if (_mount == "/") {
|
||||||
fullpath += req->match()->matched_url;
|
fullpath = _dir + "/" + req->match()->matched_url;
|
||||||
|
if (!req->match()->unmatched_url.empty()) {
|
||||||
|
fullpath += "/" + req->match()->unmatched_url;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srs_string_ends_with(fullpath, "/")) {
|
if (srs_string_ends_with(fullpath, "/")) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "49"
|
#define VERSION_REVISION "50"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "srs"
|
#define RTMP_SIG_SRS_KEY "srs"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue