Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove path size limit in URI #1134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions server/php-engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 2 additions & 4 deletions tests/python/tests/http_server/test_request_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading