パーセントエンコードが二重になってたので修正

This commit is contained in:
keita
2021-03-11 20:38:37 +09:00
parent cb2d284e54
commit 7aa9a060c0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ void HttpPost::process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth,
if (contentType_ == "application/x-www-form-urlencoded") {
std::vector<std::string> tmp;
for (const auto& [key, value] : bodyParam_) {
tmp.push_back(key + "=" + CocoaTweet::Util::urlEncode(value));
tmp.push_back(key + "=" + value);
requestBody = CocoaTweet::Util::join(tmp, "&");
}
} else if (contentType_ == "multipart/form-data") {
+1 -1
View File
@@ -24,7 +24,7 @@ std::map<std::string, std::string> OAuth1::signature(
const std::string& _url) {
std::vector<std::string> tmp;
for (const auto& [key, value] : _param) {
tmp.push_back(key + "=" + CocoaTweet::Util::urlEncode(value));
tmp.push_back(key + "=" + value);
}
std::string query = CocoaTweet::Util::join(tmp, "&");