[GH-ISSUE #1759] First env var in URL gets loaded incorrectly as lowercase #560

Closed
opened 2026-03-16 16:00:40 +03:00 by kerem · 3 comments
Owner

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:

  1. Saved Environment with 2 Variables:
    a. BASE_URL: localhost:3000
    b. API_VERSION: next

  2. Collection of many requests, organised in subdirectories, etc.

  3. Load a request from Collection A -> 'Projects' Folder -> 'GET /projects' request

ERROR: The URL will load as http://<<base_url>>/<<API_VERSION>>/projects

  • base_url should be all uppercase, as saved in collections, and env vars

Although 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_VERSION first, 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>>/projects

Desktop:

  • OS: Arch Linux, i3
  • Browser: Brave
  • Version: 1.25.73 [Chromium: 91.0.4472.106 (Official Build) (64-bit)]
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: 1. Saved Environment with 2 Variables: a. `BASE_URL`: `localhost:3000` b. `API_VERSION`: `next` 2. Collection of many requests, organised in subdirectories, etc. 3. Load a request from Collection A -> 'Projects' Folder -> 'GET /projects' request **ERROR**: The URL will load as `http://<<base_url>>/<<API_VERSION>>/projects` - `base_url` should be all uppercase, as saved in collections, and env vars Although 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_VERSION` first, 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>>/projects` **Desktop:** - OS: Arch Linux, i3 - Browser: Brave - Version: 1.25.73 [Chromium: 91.0.4472.106 (Official Build) (64-bit)]
kerem 2026-03-16 16:00:40 +03:00
Author
Owner

@liyasthomas commented on GitHub (Aug 5, 2021):

Thank you for reporting this behavior. We'll look into this and get back to you.

<!-- gh-comment-id:893168533 --> @liyasthomas commented on GitHub (Aug 5, 2021): Thank you for reporting this behavior. We'll look into this and get back to you.
Author
Owner

@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".

  • You can now sync environment variables with all sections in the request
  • Hover an environment variable within the request section to view its value
  • Environments are updated in real-time so that you don't have to manually switch environments to take effect the changes

Let us know if this behavior still persists.

<!-- gh-comment-id:908168514 --> @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". - You can now sync environment variables with all sections in the request - Hover an environment variable within the request section to view its value - Environments are updated in real-time so that you don't have to manually switch environments to take effect the changes Let us know if this behavior still persists.
Author
Owner

@ndom91 commented on GitHub (Aug 30, 2021):

@liyasthomas fixed! Thanks! v2 looks awesome, can't wait to use it more!

<!-- gh-comment-id:908233994 --> @ndom91 commented on GitHub (Aug 30, 2021): @liyasthomas fixed! Thanks! v2 looks awesome, can't wait to use it more!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#560
No description provided.