diff --git a/server/php-engine.cpp b/server/php-engine.cpp index 1dc11ca64f..c19b6e7fb1 100644 --- a/server/php-engine.cpp +++ b/server/php-engine.cpp @@ -599,11 +599,6 @@ int hts_func_execute(connection *c, int op) { qGetLen = 0; } - // TODO drop it? - if (qUriLen >= 200) { - return -418; - } - vkprintf (1, "start response processing on fd %d\n", c->fd); const char *query_type_str = nullptr; diff --git a/tests/python/tests/http_server/test_request_limits.py b/tests/python/tests/http_server/test_request_limits.py index 120e9b0565..b47faf2f89 100644 --- a/tests/python/tests/http_server/test_request_limits.py +++ b/tests/python/tests/http_server/test_request_limits.py @@ -15,15 +15,13 @@ def test_query_limit(self): self.assertEqual(resp.status_code, 200) self.assertEqual(resp.json()["REQUEST_URI"], uri) - resp = self.kphp_server.http_get(uri="/{}".format("a" * 200)) - self.assertEqual(resp.status_code, 418) - uri = "/test_limits?" + self._get_rand_str(15000) resp = self.kphp_server.http_get(uri) self.assertEqual(resp.status_code, 200) self.assertEqual(resp.json()["REQUEST_URI"], uri) - resp = self.kphp_server.http_get(uri="/{}".format("a" * 17000)) + # Base on MAX_HTTP_HEADER_QUERY_WORD_SIZE 16 * 1024 + resp = self.kphp_server.http_get(uri="/{}".format(("a" * (16 * 1024)))) self.assertEqual(resp.status_code, 414) resp = self.kphp_server.http_get(uri="/a?{}".format("a" * 17000))