Skip to content

mgr/dashboard: add text/javascript to gzip mime types - #70625

Merged
afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix/dashboard-gzip-mime-type
Jul 29, 2026
Merged

afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix/dashboard-gzip-mime-type

Conversation

@afreen23

Copy link
Copy Markdown
Contributor

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.

Before/After

image image

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

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 <[email protected]>
@afreen23
afreen23 requested a review from a team as a code owner July 28, 2026 13:47
@afreen23
afreen23 requested review from aaSharma14 and nmunet July 28, 2026 13:47
@nizamial09 nizamial09 changed the title mgr/dashboard: add text/javascript to gzip mime types mgr/dashboard: add text/javascript to gzip mime types Jul 28, 2026
@nizamial09

Copy link
Copy Markdown
Member

jenkins test dashboard

@nizamial09

Copy link
Copy Markdown
Member

jenkins test dashboard cephadm

@afreen23

Copy link
Copy Markdown
Contributor Author

jenkins test api

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jul 29, 2026
@afreen23
afreen23 merged commit 66a1de3 into ceph:main Jul 29, 2026
8 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 29, 2026
@afreen23
afreen23 deleted the fix/dashboard-gzip-mime-type branch July 29, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants