mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5565] fix: [5559] handle URL parsing when --compressed flag directly precedes URL #5265
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#5265
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?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5565
Author: @ankur-2103
Created: 11/7/2025
Status: 🔄 Open
Base:
main← Head:fix/5559-url-not-recognized-compressed-flag📝 Commits (2)
28efadbfix: handle URL parsing when --compressed flag directly precedes URL (#5559)b28eb7ctest: fix failing test case for --compressed flag parsing (#5559)📊 Changes
1 file changed (+6 additions, -1 deletions)
View changed files
📝
packages/hoppscotch-common/src/helpers/curl/curlparser.ts(+6 -1)📄 Description
🧩 Fix: cURL Parser URL Missing When Using
--compressed📋 Summary
This update fixes a bug in Hoppscotch where importing a cURL command containing the
--compressedflag caused the request URL (endpoint) to be missing or incorrectly parsed.When importing cURL commands such as:
✅ Fix Implemented
The issue occurred because
yargs-parsertreated the URL as a value for the--compressedflag.To fix this, the parser configuration was updated to explicitly mark
--compressedas a boolean flag, ensuring it doesn’t capture the next token (the URL).Code Change
⚙️ 2️⃣ Configuration Explanation
Show what each option does and why it matters.
⚙️ Configuration Explanation
boolean: ["compressed"]--compressedis a standalone flag, not consuming the next value (URL)"parse-numbers": false"camel-case-expansion": false--data-urlencodestays the same)"boolean-negation": false--no-keepalive🧪 Verification
✅ Test Case 1 — Original Input
✅ Test Case 2 — POST Request with JSON Body and Cookies
🧾 Change Type
helpers/curl/curlparser.ts--compressedflag👨💻 Author
@ankur-2103
Fixed boolean flag handling for
--compressedin the cURL import parser.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.