Skip to content

req.getHost() doesn't work if hostname is a variable #9233

Description

@harristom

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • Making Bruno unusable for me.
  • Slowing me down but I'm able to continue working.
  • Annoying.
  • This feature was working in a previous version but is broken in the current release.

Bruno version

4.1.0

💻 Operating System

Windows

Specific OS Version / Distro

No response

🐞 Describe the bug

req.getHost() returns an empty string if hostname is a variable.

Works if scheme is separate to the variable but has a different issue with case sensitivity that I will file separately

📝 Steps to reproduce

Set HOST variable to "https://example.com"
Set request URL to "{{HOST}}/test"
In pre-request script: console.log(req.getHost());
Empty string is logged

📁 Collection to reproduce

No response

📷 Screenshots/Live demo link

n/a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions