codesenberg / bombardier

Fast cross-platform HTTP benchmarking tool written in Go
MIT License
6.06k stars 317 forks source link

Bug when using more than one query parameter #104

Closed vpaulino closed 1 year ago

vpaulino commented 1 year ago

This is an example of what a bug report can look like. Please, feel free to also provide any other information relevant to the issue.

What version of bombardier are you using?

Hash of the commit, like

00d7965d6cae34c62042abb0f6c45c45b870dcf3

in case you've built bombardier yourself or version obtained by

Executing --version I have "bombardier version unspecified windows/amd64

in case you are using binaries.

What operating system and processor architecture are you using (if relevant)?

windows/amd64,

What did you do?

I have an aspnet core 7 application running attached with visual studio available to test at the usual https ports that visual studio generates. The endpoint Im executing contains two query parameters and when I try to execute bombardier to GET resources from that endpoint he executes the request but only using the first query parameter, the following ones are wrongly interpreted as an atemptive to use a comand. Here is a print screen:

image

Describe steps that can be used to reproduce the error.

1- > bombardier https://localhost:7033/api/v1/products?take=50&lastProductID=0

What you expected to happen?

to execute the http request using both parameters correctly

What actually happened?

The request was made but using only one parameter. the following ones by the error message are wrong interpreted as bombardier commands.

codesenberg commented 1 year ago

If you look closely at the bottom of your screenshot, you'll see: image

Judging by the path and error messages, this is cmd.exe and what happens is cmd.exe interprets you command bombardier https://localhost:7033/api/v1/products?take=50&lastProductID=0 something like:

  1. Execute bombardier command and pass it https://localhost:7033/api/v1/products?take=50 argument;
  2. & - and then;
  3. Execute lastProductID command (guess =0 becomes an argument, but irrelevant here), which cmd.exe doesn't recognize.

What you should be doing is surrounding the URL with double quotes, like so:

bombardier "https://localhost:7033/api/v1/products?take=50&lastProductID=0"