mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #1759] First env var in URL gets loaded incorrectly as lowercase #560
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#560
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 @ndom91 on GitHub (Aug 4, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1759
First of all, great project! Been using it since the 'Postwoman' days. Keep up the great work! I have run into a small issue, however:
Describe the bug:
My setup looks like this:
Saved Environment with 2 Variables:
a.
BASE_URL:localhost:3000b.
API_VERSION:nextCollection of many requests, organised in subdirectories, etc.
Load a request from Collection A -> 'Projects' Folder -> 'GET /projects' request
ERROR: The URL will load as
http://<<base_url>>/<<API_VERSION>>/projectsbase_urlshould be all uppercase, as saved in collections, and env varsAlthough I have saved both environment variables in the URL bar as uppercase, multiple times. When opening the request from the collections panel, it always loads the first env var as lowercase. I then have to manually edit the environment variable to be uppercase before it will work.
I've tested swapping them around, i.e.
API_VERSIONfirst, it will then load that as lowercase.It seems that somewhere along the 'loading request from collection' code path, in a loop for dealing with the env vars, a
.toLowerCase()or something like that is hit on the first time around, when it shouldn't be.Expected Behaviour:
A clear and concise description of what you expected to happen.
Load the URL as saved, with matching environment variables to those that are set in the UI, i.e. all uppercase.
http://<<BASE_URL>>/<<API_VERSION>>/projectsDesktop:
@liyasthomas commented on GitHub (Aug 5, 2021):
Thank you for reporting this behavior. We'll look into this and get back to you.
@liyasthomas commented on GitHub (Aug 30, 2021):
With the release of v2 - we've introduced a new feature-rich, and more robust environments engine with support for "Global environments".
Let us know if this behavior still persists.
@ndom91 commented on GitHub (Aug 30, 2021):
@liyasthomas fixed! Thanks! v2 looks awesome, can't wait to use it more!