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

Bump max query string length from 2K to 4K.

Kishore Nallan6065463a533e
diff --git a/src/http_server.cpp b/src/http_server.cpp
index ae9f9b2a..4008dfcc 100644
--- a/src/http_server.cpp
+++ b/src/http_server.cpp
@@ -310,7 +310,7 @@ int HttpServer::catch_all_handler(h2o_handler_t *_h2o_handler, h2o_req_t *req) {
0, NULL, acl_req_headers.base, acl_req_headers.len);
h2o_add_header_by_str(&req->pool, &req->res.headers,
H2O_STRLIT("access-control-max-age"),
- 0, NULL, H2O_STRLIT("86400"));
+ 0, NULL, H2O_STRLIT("3600"));
h2o_start_response(req, &generator);
h2o_send(req, &res_body, 1, H2O_SEND_STATE_FINAL);
diff --git a/src/string_utils.cpp b/src/string_utils.cpp
index 050cdebb..f053961e 100644
--- a/src/string_utils.cpp
+++ b/src/string_utils.cpp
@@ -71,8 +71,8 @@ std::string StringUtils::hash_sha256(const std::string& str) {
}
std::map<std::string, std::string> StringUtils::parse_query_string(const std::string &query) {
- if(query.size() > 2000) {
- LOG(ERROR) << "Query string exceeds max allowed length of 2000. Actual length: " << query.size();
+ if(query.size() > 4000) {
+ LOG(ERROR) << "Query string exceeds max allowed length of 4000. Actual length: " << query.size();
return {};
}