diff --git a/src/Common/Parser.cpp b/src/Common/Parser.cpp index a7be567c..3e793039 100644 --- a/src/Common/Parser.cpp +++ b/src/Common/Parser.cpp @@ -10,6 +10,7 @@ #include #include "Parser.h" +#include "strCoding.h" #include "macros.h" #include "Network/sockutil.h" #include "Common/macros.h" @@ -287,9 +288,10 @@ void RtspUrl::setup(bool is_ssl, const string &url, const string &user, const st uint16_t port = is_ssl ? 322 : 554; splitUrl(ip, ip, port); + _url = std::move(url); - _user = std::move(user); - _passwd = std::move(passwd); + _user = strCoding::UrlDecode(std::move(user)); + _passwd = strCoding::UrlDecode(std::move(passwd)); _host = std::move(ip); _port = port; _is_ssl = is_ssl; diff --git a/src/Http/strCoding.cpp b/src/Common/strCoding.cpp similarity index 100% rename from src/Http/strCoding.cpp rename to src/Common/strCoding.cpp diff --git a/src/Http/strCoding.h b/src/Common/strCoding.h similarity index 100% rename from src/Http/strCoding.h rename to src/Common/strCoding.h diff --git a/src/Http/HttpClient.h b/src/Http/HttpClient.h index c82804d4..497f4a1d 100644 --- a/src/Http/HttpClient.h +++ b/src/Http/HttpClient.h @@ -22,7 +22,7 @@ #include "HttpRequestSplitter.h" #include "HttpCookie.h" #include "HttpChunkedSplitter.h" -#include "strCoding.h" +#include "Common/strCoding.h" #include "HttpBody.h" namespace mediakit { diff --git a/src/Http/HttpFileManager.cpp b/src/Http/HttpFileManager.cpp index af032597..7f69297b 100644 --- a/src/Http/HttpFileManager.cpp +++ b/src/Http/HttpFileManager.cpp @@ -20,7 +20,7 @@ #include "Record/HlsMediaSource.h" #include "Common/Parser.h" #include "Common/config.h" -#include "strCoding.h" +#include "Common/strCoding.h" using namespace std; using namespace toolkit; diff --git a/src/Http/HttpSession.cpp b/src/Http/HttpSession.cpp index 7d5689a2..fb7aed7f 100644 --- a/src/Http/HttpSession.cpp +++ b/src/Http/HttpSession.cpp @@ -12,7 +12,7 @@ #include #include #include "Common/config.h" -#include "strCoding.h" +#include "Common/strCoding.h" #include "HttpSession.h" #include "HttpConst.h" #include "Util/base64.h"