Changeset View
Changeset View
Standalone View
Standalone View
src/httpserver.cpp
Show First 20 Lines • Show All 651 Lines • ▼ Show 20 Lines | for (; i != iend; ++i) | ||||
if (i->prefix == prefix && i->exactMatch == exactMatch) break; | if (i->prefix == prefix && i->exactMatch == exactMatch) break; | ||||
if (i != iend) { | if (i != iend) { | ||||
LogPrint(BCLog::HTTP, | LogPrint(BCLog::HTTP, | ||||
"Unregistering HTTP handler for %s (exactmatch %d)\n", prefix, | "Unregistering HTTP handler for %s (exactmatch %d)\n", prefix, | ||||
exactMatch); | exactMatch); | ||||
pathHandlers.erase(i); | pathHandlers.erase(i); | ||||
} | } | ||||
} | } | ||||
std::string urlDecode(const std::string &urlEncoded) { | |||||
std::string res; | |||||
if (!urlEncoded.empty()) { | |||||
char *decoded = evhttp_uridecode(urlEncoded.c_str(), false, nullptr); | |||||
if (decoded) { | |||||
res = std::string(decoded); | |||||
free(decoded); | |||||
} | |||||
} | |||||
return res; | |||||
} |