Skip to content

Instantly share code, notes, and snippets.

@xabbu
Created February 28, 2018 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xabbu/4b93253341e467ab13befc124c358be9 to your computer and use it in GitHub Desktop.
Save xabbu/4b93253341e467ab13befc124c358be9 to your computer and use it in GitHub Desktop.
Brotli tests
curl -o Lorem5000.txt.br -H 'Accept-encoding: br' http://debian-test.local/Lorem5000.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10104 0 10104 0 0 1644k 0 --:--:-- --:--:-- --:--:-- 1644k
[28/Feb/2018:03:45:28 +0100] "GET /Lorem5000.txt HTTP/1.1" 200 10117 gzip - br 3.24
brotli -t Lorem5000.txt.br
corrupt input [Lorem5000.txt.br]
curl -o Lorem5000.txt.gz -H 'Accept-encoding: gzip' http://debian-test.local/Lorem5000.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10864 0 10864 0 0 1768k 0 --:--:-- --:--:-- --:--:-- 1768k
[28/Feb/2018:03:46:33 +0100] "GET /Lorem5000.txt HTTP/1.1" 200 10877 gzip 3.13 br -
gzip -t Lorem5000.txt.gz
(no output, so no corrupt file)
curl -o Lorem5000.txt http://debian-test.local/Lorem5000.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33982 100 33982 0 0 6637k 0 --:--:-- --:--:-- --:--:-- 6637k
[28/Feb/2018:03:47:36 +0100] "GET /Lorem5000.txt HTTP/1.1" 200 33982 gzip - br -
curl -H 'Accept-encoding: br' http://debian-test.local/notfound | brotli -cd
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 115 0 115 0 0 16428 0 --:--:-- --:--:-- --:--:-- 16428
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
corrupt input [con]
[28/Feb/2018:03:50:36 +0100] "GET /notfound HTTP/1.1" 404 126 gzip - br 1.01
curl -H 'Accept-encoding: gzip' http://debian-test.local/notfound | gzip -d
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 132 0 132 0 0 33000 0 --:--:-- --:--:-- --:--:-- 33000
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.13.9</center>
</body>
</html>
[28/Feb/2018:03:51:38 +0100] "GET /notfound HTTP/1.1" 404 143 gzip 1.28 br -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment