diff options
| author | UltraQbik <no1skill@yandex.ru> | 2024-08-24 19:51:04 +0300 |
|---|---|---|
| committer | UltraQbik <no1skill@yandex.ru> | 2024-08-24 19:51:04 +0300 |
| commit | 443b0216eec676360f9b835607301c3d7fd427d3 (patch) | |
| tree | 1fde5805c61d77f854acaf43c31936ed11232b41 | |
| parent | b23b31926bef9447cd2eede4dc160fd922576488 (diff) | |
| download | httpy-443b0216eec676360f9b835607301c3d7fd427d3.tar.gz httpy-443b0216eec676360f9b835607301c3d7fd427d3.zip | |
Add HTML minimizer
| -rw-r--r-- | main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main.py b/main.py index db3a716..97f53d0 100644 --- a/main.py +++ b/main.py @@ -178,6 +178,9 @@ class HTTPServer: with open(filepath, "rb") as file: data = file.read() + if filepath[-4:] == "html": + data = minimize_html(data) + if request.type == "GET": return Response(data, STATUS_CODE_OK) elif request.type == "HEAD": |