Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Parameters Passed in the URL #2124

Open
2 tasks done
Chibane690 opened this issue Apr 18, 2024 · 3 comments · May be fixed by #2139
Open
2 tasks done

Issue with Parameters Passed in the URL #2124

Chibane690 opened this issue Apr 18, 2024 · 3 comments · May be fixed by #2139
Labels
bug Something isn't working

Comments

@Chibane690
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

I added a parameter "q" directly into the URL bar to be executed without going through the query array as illustrated in the image below:

Capture

When I added another parameter from the query array, in my case it was the "options" attribute with the value "concise", it modified the value of the "q" attribute that I associated at the beginning, which caused a bug as illustrated in the image below:

Capture2

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Capture
Capture2

@Chibane690 Chibane690 added the bug Something isn't working label Apr 18, 2024
@pietrygamat
Copy link
Contributor

pietrygamat commented Apr 18, 2024

I think this is a serious bug and important feature to fix, but it comes with a bunch of design decisions to make. The URL field should probably validate its contents and notify user if the value is not correctly formatted URL - and what @Chibane690 inputs is in fact invalid.

Is bruno supposed to silently try to url encode the value of URL field? What request is actually being sent from this example? What if loading a bru file where the query section does not match url section? Which takes precedence? It would be nice to have an input from maintainers (@helloanoop) on their vision for this, so someone could pick this up.

A UI solution in this particular case would look something like this, I think - but it takes more than that to iron out this issue:
Params to URL converion on the fly
params2url

Params from URL converted on the fly (assuming user types in url-encoded format, which is perhaps much to ask from a human).
url2params

@Chibane690
Copy link
Author

Chibane690 commented Apr 19, 2024

I downloaded the Postman client to perform the same test, and it worked well. It escaped the quotes but not the "==" when sending the request, rather than during inputting the request.

Here's a screenshot illustrating the request input:

Capture7

And here's the image during the request emission:

Capture8

The execution went smoothly without any bugs.

pietrygamat added a commit to pietrygamat/bruno that referenced this issue Apr 19, 2024
The '=' should be allowed within query parameter value. While first equals sign separates parameter name from its value, any subsequent occurrences are valid and should not be discarded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants