mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5294] [bug]: raw body of "text/plain" mime type is mapped to "text/x-yaml" codemirror mode #2022
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2022
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lchansf on GitHub (Jul 29, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5294
Originally assigned to: @anwarulislam on GitHub.
Is there an existing issue for this?
Platform
Web App
Browser
Chrome
Operating System
macOS
Bug Description
If I set the content-type of a request body to "text/plain" and paste a long text with little space (in my case it contains a long base64-encoded string that's over 1 Mb), the hoppscotch UI will become unresponsive. It takes 2-3 minutes for it to become responsive again.
The problem seems to be that RawBody.vue calls getEditorLangForMimeType in editorutils.ts to map the content-type to CodeMirror mode. "text/plain" and anything not in the map is mapped to "text/x-yaml":
The yaml parser in CodeMirror takes a long time to finish parsing such long text when it's not really in yaml format. It doesn't seem Hoppscotch should use "text/x-yaml" as the default, especially when the content-type is already specified as "text/plain".
This is reproducible in both web app and desktop app, but it takes longer for web app to become responsive again.
Deployment Type
Self-hosted (on-prem deployment)
Version
25.4.5 (20250630.202218)
@jamesgeorge007 commented on GitHub (Dec 5, 2025):
Closing since this is addressed in the v2025.11.1 release.