2016-12-21 20:04:27 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-02-11 23:37:16 +00:00
|
|
|
|
2016-02-19 19:02:20 +00:00
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=1' -d 'SELECT number FROM system.numbers LIMIT 10';
|
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=0' -H 'Accept-Encoding: gzip' -d 'SELECT number FROM system.numbers LIMIT 10';
|
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: gzip' -d 'SELECT number FROM system.numbers LIMIT 10' | gzip -d;
|
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: gzip, deflate' -d 'SELECT number FROM system.numbers LIMIT 10' | gzip -d;
|
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: zip, eflate' -d 'SELECT number FROM system.numbers LIMIT 10';
|
2016-02-11 23:37:16 +00:00
|
|
|
|
2016-02-19 19:02:20 +00:00
|
|
|
curl -vsS 'http://localhost:8123/?enable_http_compression=1' -d 'SELECT number FROM system.numbers LIMIT 10' 2>&1 | grep --text '< Content-Encoding';
|
|
|
|
curl -vsS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: gzip' -d 'SELECT number FROM system.numbers LIMIT 10' 2>&1 | grep --text '< Content-Encoding';
|
|
|
|
curl -vsS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: deflate' -d 'SELECT number FROM system.numbers LIMIT 10' 2>&1 | grep --text '< Content-Encoding';
|
|
|
|
curl -vsS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: gzip, deflate' -d 'SELECT number FROM system.numbers LIMIT 10' 2>&1 | grep --text '< Content-Encoding';
|
|
|
|
curl -vsS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: zip, eflate' -d 'SELECT number FROM system.numbers LIMIT 10' 2>&1 | grep --text '< Content-Encoding';
|
2016-02-12 00:56:15 +00:00
|
|
|
|
|
|
|
echo "SELECT 1" | curl -sS --data-binary @- 'http://localhost:8123/';
|
|
|
|
echo "SELECT 1" | gzip -c | curl -sS --data-binary @- -H 'Content-Encoding: gzip' 'http://localhost:8123/';
|
|
|
|
|
|
|
|
echo "'Hello, world'" | curl -sS --data-binary @- 'http://localhost:8123/?query=SELECT';
|
|
|
|
echo "'Hello, world'" | gzip -c | curl -sS --data-binary @- -H 'Content-Encoding: gzip' 'http://localhost:8123/?query=SELECT';
|
2016-02-16 16:35:20 +00:00
|
|
|
|
2016-02-19 19:02:20 +00:00
|
|
|
curl -sS 'http://localhost:8123/?enable_http_compression=1' -H 'Accept-Encoding: gzip' -d 'SELECT number FROM system.numbers LIMIT 0' | wc -c;
|
2017-01-07 16:11:30 +00:00
|
|
|
|
|
|
|
# POST multiple concatenated gzip streams.
|
|
|
|
(echo -n "SELECT 'Part1" | gzip -c; echo " Part2'" | gzip -c) | curl -sS -H 'Content-Encoding: gzip' 'http://localhost:8123/?' --data-binary @-
|