Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

URL decode collection name in the API path.

Kishore Nallan4596ca04c236
diff --git a/src/http_server.cpp b/src/http_server.cpp
index e78a8a96..f97d1f94 100644
--- a/src/http_server.cpp
+++ b/src/http_server.cpp
@@ -377,7 +377,11 @@ int HttpServer::catch_all_handler(h2o_handler_t *_h2o_handler, h2o_req_t *req) {
for(size_t i = 0; i < rpath->path_parts.size(); i++) {
const std::string & path_part = rpath->path_parts[i];
if(path_part[0] == ':') {
- query_map.emplace(path_part.substr(1), path_parts[i]);
+ std::string& value = path_parts[i];
+ if(path_part == ":collection") {
+ value = StringUtils::url_decode(value);
+ }
+ query_map.emplace(path_part.substr(1), value);
}
}