2022-05-11 14:54:33 +03:00
|
|
|
# Uncompressed body tests:
|
|
|
|
# ---------------------------
|
|
|
|
# --compressed has no effect on non compressed.
|
|
|
|
|
2020-10-14 14:24:11 +03:00
|
|
|
GET http://localhost:8000/compressed/none
|
|
|
|
HTTP/1.0 200
|
|
|
|
Content-Length: 12
|
|
|
|
Content-Type: text/html; charset=utf-8
|
2022-05-10 18:44:18 +03:00
|
|
|
[Asserts]
|
|
|
|
body startsWith "Hello"
|
|
|
|
bytes startsWith hex,48656c6c6f;
|
|
|
|
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
|
|
|
|
md5 == hex,ed076287532e86365e841e92bfc50d8c;
|
2020-10-14 14:24:11 +03:00
|
|
|
```Hello World!```
|
|
|
|
|
2022-05-11 14:54:33 +03:00
|
|
|
# Test base64 implicit body:
|
|
|
|
GET http://localhost:8000/compressed/none
|
|
|
|
HTTP/1.0 200
|
|
|
|
base64,SGVsbG8gV29ybGQh;
|
|
|
|
|
|
|
|
# Test hex implicit body:
|
|
|
|
GET http://localhost:8000/compressed/none
|
|
|
|
HTTP/1.0 200
|
|
|
|
hex,48656c6c6f20576f726c6421;
|
|
|
|
|
|
|
|
# Test file implicit body:
|
|
|
|
GET http://localhost:8000/compressed/none
|
|
|
|
HTTP/1.0 200
|
|
|
|
file,hello.txt;
|
|
|
|
|
|
|
|
|
|
|
|
# GZip compressed body tests:
|
|
|
|
# ---------------------------
|
|
|
|
|
2020-10-11 22:13:41 +03:00
|
|
|
GET http://localhost:8000/compressed/gzip
|
|
|
|
HTTP/1.0 200
|
|
|
|
Content-Length: 32
|
|
|
|
Content-Encoding: gzip
|
|
|
|
Content-Type: text/html; charset=utf-8
|
2022-05-10 18:44:18 +03:00
|
|
|
[Asserts]
|
|
|
|
body startsWith "Hello"
|
|
|
|
bytes startsWith hex,48656c6c6f;
|
|
|
|
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
|
|
|
|
md5 == hex,ed076287532e86365e841e92bfc50d8c;
|
2020-10-11 22:13:41 +03:00
|
|
|
```Hello World!```
|
|
|
|
|
2022-05-11 14:54:33 +03:00
|
|
|
# Test base64 implicit body:
|
|
|
|
GET http://localhost:8000/compressed/gzip
|
|
|
|
HTTP/1.0 200
|
|
|
|
base64,SGVsbG8gV29ybGQh;
|
|
|
|
|
|
|
|
# Test hex implicit body:
|
|
|
|
GET http://localhost:8000/compressed/gzip
|
|
|
|
HTTP/1.0 200
|
|
|
|
hex,48656c6c6f20576f726c6421;
|
|
|
|
|
|
|
|
# Test file implicit body:
|
|
|
|
GET http://localhost:8000/compressed/gzip
|
|
|
|
HTTP/1.0 200
|
|
|
|
file,hello.txt;
|
|
|
|
|
|
|
|
|
|
|
|
# ZLib compressed body tests:
|
|
|
|
# ---------------------------
|
|
|
|
|
2020-10-14 14:24:11 +03:00
|
|
|
GET http://localhost:8000/compressed/zlib
|
2020-10-11 22:13:41 +03:00
|
|
|
HTTP/1.0 200
|
2020-10-14 14:24:11 +03:00
|
|
|
Content-Length: 20
|
|
|
|
Content-Encoding: deflate
|
|
|
|
Content-Type: text/html; charset=utf-8
|
2022-05-10 18:44:18 +03:00
|
|
|
[Asserts]
|
|
|
|
body startsWith "Hello"
|
|
|
|
bytes startsWith hex,48656c6c6f;
|
|
|
|
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
|
|
|
|
md5 == hex,ed076287532e86365e841e92bfc50d8c;
|
2020-10-14 14:24:11 +03:00
|
|
|
```Hello World!```
|
|
|
|
|
2022-05-11 14:54:33 +03:00
|
|
|
# Test base64 implicit body:
|
|
|
|
GET http://localhost:8000/compressed/zlib
|
|
|
|
HTTP/1.0 200
|
|
|
|
base64,SGVsbG8gV29ybGQh;
|
|
|
|
|
|
|
|
# Test hex implicit body:
|
|
|
|
GET http://localhost:8000/compressed/zlib
|
|
|
|
HTTP/1.0 200
|
|
|
|
hex,48656c6c6f20576f726c6421;
|
|
|
|
|
|
|
|
# Test file implicit body:
|
|
|
|
GET http://localhost:8000/compressed/zlib
|
|
|
|
HTTP/1.0 200
|
|
|
|
file,hello.txt;
|
|
|
|
|
|
|
|
|
|
|
|
# Brotli compressed body tests:
|
|
|
|
# ---------------------------
|
|
|
|
|
2020-10-14 14:24:11 +03:00
|
|
|
GET http://localhost:8000/compressed/brotli
|
|
|
|
HTTP/1.0 200
|
2020-10-20 09:18:27 +03:00
|
|
|
Content-Length: 17
|
2020-10-14 14:24:11 +03:00
|
|
|
Content-Encoding: br
|
2020-10-11 22:13:41 +03:00
|
|
|
Content-Type: text/html; charset=utf-8
|
2022-05-10 18:44:18 +03:00
|
|
|
[Asserts]
|
|
|
|
body startsWith "Hello"
|
|
|
|
bytes startsWith hex,48656c6c6f;
|
|
|
|
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
|
|
|
|
md5 == hex,ed076287532e86365e841e92bfc50d8c;
|
2020-10-20 14:51:50 +03:00
|
|
|
```Hello World!```
|
|
|
|
|
2022-05-11 14:54:33 +03:00
|
|
|
# Test base64 implicit body:
|
|
|
|
GET http://localhost:8000/compressed/brotli
|
|
|
|
HTTP/1.0 200
|
|
|
|
base64,SGVsbG8gV29ybGQh;
|
|
|
|
|
|
|
|
# Test hex implicit body:
|
|
|
|
GET http://localhost:8000/compressed/brotli
|
|
|
|
HTTP/1.0 200
|
|
|
|
hex,48656c6c6f20576f726c6421;
|
|
|
|
|
|
|
|
# Test file implicit body:
|
|
|
|
GET http://localhost:8000/compressed/brotli
|
|
|
|
HTTP/1.0 200
|
|
|
|
file,hello.txt;
|
|
|
|
|
2022-05-11 18:13:16 +03:00
|
|
|
# Test a large brotli compressed body:
|
|
|
|
GET http://localhost:8000/compressed/brotli_large
|
|
|
|
HTTP/1.0 200
|
|
|
|
Content-Encoding: br
|
|
|
|
Content-Type: image/jpeg
|
|
|
|
[Asserts]
|
|
|
|
bytes startsWith hex,ffd8ffe0; # JPEG magic number
|
|
|
|
file,cat.jpg;
|
|
|
|
|
2020-10-20 14:51:50 +03:00
|
|
|
GET http://localhost:8000/compressed/brotli_identity
|
|
|
|
HTTP/1.0 200
|
|
|
|
Content-Length: 17
|
|
|
|
Content-Encoding: br, identity
|
|
|
|
Content-Type: text/html; charset=utf-8
|
2022-05-10 18:44:18 +03:00
|
|
|
[Asserts]
|
|
|
|
body startsWith "Hello"
|
|
|
|
bytes startsWith hex,48656c6c6f;
|
|
|
|
sha256 == hex,7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069;
|
|
|
|
md5 == hex,ed076287532e86365e841e92bfc50d8c;
|
|
|
|
```Hello World!```
|