mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Allow empty HTTP headers
This commit is contained in:
parent
87eedfded8
commit
33f816d28d
@ -123,7 +123,7 @@ inline bool isWhitespaceASCII(char c)
|
|||||||
/// Since |isWhiteSpaceASCII()| is used inside algorithms it's easier to implement another function than add extra argument.
|
/// Since |isWhiteSpaceASCII()| is used inside algorithms it's easier to implement another function than add extra argument.
|
||||||
inline bool isWhitespaceASCIIOneLine(char c)
|
inline bool isWhitespaceASCIIOneLine(char c)
|
||||||
{
|
{
|
||||||
return c == ' ' || c == '\t' || c == '\r' || c == '\f' || c == '\v';
|
return c == ' ' || c == '\t' || c == '\f' || c == '\v';
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool isControlASCII(char c)
|
inline bool isControlASCII(char c)
|
||||||
|
@ -68,9 +68,6 @@ void readHeaders(
|
|||||||
if (in.eof())
|
if (in.eof())
|
||||||
throw Poco::Net::MessageException("Field is invalid");
|
throw Poco::Net::MessageException("Field is invalid");
|
||||||
|
|
||||||
if (value.empty())
|
|
||||||
throw Poco::Net::MessageException("Field value is empty");
|
|
||||||
|
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
throw Poco::Net::MessageException("No CRLF found");
|
throw Poco::Net::MessageException("No CRLF found");
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
. "$CURDIR"/../shell_config.sh
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'EmptyHeader;' -d 'SELECT 1'
|
||||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-User: default' -d 'SELECT 1'
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-User: default' -d 'SELECT 1'
|
||||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-User: header_test' -d 'SELECT 1' | grep -o 'Code: 516'
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-User: header_test' -d 'SELECT 1' | grep -o 'Code: 516'
|
||||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-Key: ' -d 'SELECT 1'
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -H 'X-ClickHouse-Key: ' -d 'SELECT 1'
|
||||||
|
Loading…
Reference in New Issue
Block a user