mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix the http implicit handler bug
This commit is contained in:
parent
b247c9759a
commit
216a23f709
2 changed files with 22 additions and 6 deletions
|
@ -667,16 +667,13 @@ srs_error_t SrsHttpServeMux::handle(std::string pattern, ISrsHttpHandler* handle
|
|||
std::string rpattern = pattern.substr(0, pattern.length() - 1);
|
||||
SrsHttpMuxEntry* entry = NULL;
|
||||
|
||||
// free the exists not explicit entry
|
||||
// free the exists implicit entry
|
||||
if (entries.find(rpattern) != entries.end()) {
|
||||
SrsHttpMuxEntry* exists = entries[rpattern];
|
||||
if (!exists->explicit_match) {
|
||||
entry = exists;
|
||||
}
|
||||
entry = entries[rpattern];
|
||||
}
|
||||
|
||||
// create implicit redirect.
|
||||
if (!entry || entry->explicit_match) {
|
||||
if (!entry || !entry->explicit_match) {
|
||||
srs_freep(entry);
|
||||
|
||||
entry = new SrsHttpMuxEntry();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue