Skip empty URL parameters #10749

This commit is contained in:
Alexey Milovidov 2020-06-14 03:56:13 +03:00
parent f53da4d36b
commit 970a8e3ecc
3 changed files with 17 additions and 0 deletions

View File

@ -430,6 +430,10 @@ void HTTPHandler::processQuery(
auto param_could_be_skipped = [&] (const String & name)
{
/// Empty parameter appears when URL like ?&a=b or a=b&&c=d. Just skip them for user's convenience.
if (name.empty())
return true;
if (reserved_param_names.count(name))
return true;

View File

@ -0,0 +1,3 @@
1
1
1

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
set -e
$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL&query=select%201&log_queries=1"
$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL&&query=select%201&log_queries=1"
$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL&query=select%201&&&log_queries=1"