CherryPy's serve_file() uses Python's mimetypes module which returns
text/javascript for .js files (RFC 9239), but the gzip config only
listed application/javascript. This meant the main Angular bundle
was being served uncompressed. With Cheroot write timeouts,
the uncompressed transfer times out over slower networks, causing
ERR_CONTENT_LENGTH_MISMATCH in the browser.
Signed-off-by: Afreen Misbah <afreen@ibm.com>
'tools.gzip.on': True,
'tools.gzip.mime_types': [
'text/html', 'text/plain', 'application/json',
- 'application/*+json', 'application/javascript', 'text/css'
+ 'application/*+json', 'application/javascript',
+ 'text/javascript', 'text/css'
],
'tools.json_in.on': True,
'tools.json_in.force': True,