(accept_encoding_header: str)
| 409 | |
| 410 | |
| 411 | def gzip_accepted(accept_encoding_header: str) -> bool: |
| 412 | accept_encoding_header = accept_encoding_header or '' |
| 413 | for accepted in accept_encoding_header.split(','): |
| 414 | if accepted.split(';')[0].strip().lower() == 'gzip': |
| 415 | return True |
| 416 | return False |
| 417 | |
| 418 | |
| 419 | class MetricsHandler(BaseHTTPRequestHandler): |