Added URL encode for info_/embed_ stream URLs
This commit is contained in:
parent
ec7f7f5bc4
commit
33a0b2fae3
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include "output_http_internal.h"
|
#include "output_http_internal.h"
|
||||||
#include <mist/stream.h>
|
#include <mist/stream.h>
|
||||||
|
#include <mist/encode.h>
|
||||||
#include "flashPlayer.h"
|
#include "flashPlayer.h"
|
||||||
#include "oldFlashPlayer.h"
|
#include "oldFlashPlayer.h"
|
||||||
|
|
||||||
|
@ -145,7 +146,7 @@ namespace Mist {
|
||||||
std::string relurl;
|
std::string relurl;
|
||||||
size_t found = rel.find('$');
|
size_t found = rel.find('$');
|
||||||
if (found != std::string::npos){
|
if (found != std::string::npos){
|
||||||
relurl = rel.substr(0, found) + streamname + rel.substr(found+1);
|
relurl = rel.substr(0, found) + Encodings::URL::encode(streamname) + rel.substr(found+1);
|
||||||
}else{
|
}else{
|
||||||
relurl = "/";
|
relurl = "/";
|
||||||
}
|
}
|
||||||
|
@ -153,7 +154,7 @@ namespace Mist {
|
||||||
if (it->isMember("url_rel")){
|
if (it->isMember("url_rel")){
|
||||||
size_t foundb = (*it)["url_rel"].asStringRef().find('$');
|
size_t foundb = (*it)["url_rel"].asStringRef().find('$');
|
||||||
if (foundb != std::string::npos){
|
if (foundb != std::string::npos){
|
||||||
relurl = (*it)["url_rel"].asStringRef().substr(0, foundb) + streamname + (*it)["url_rel"].asStringRef().substr(foundb+1);
|
relurl = (*it)["url_rel"].asStringRef().substr(0, foundb) + Encodings::URL::encode(streamname) + (*it)["url_rel"].asStringRef().substr(foundb+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!strmMeta.isMember("live") || !it->isMember("nolive")){
|
if (!strmMeta.isMember("live") || !it->isMember("nolive")){
|
||||||
|
|
Loading…
Add table
Reference in a new issue