rakyll / hey

HTTP load generator, ApacheBench (ab) replacement
Apache License 2.0
17.66k stars 1.17k forks source link

first path segment in URL cannot contain colon #205

Closed fjfzeagle closed 3 years ago

fjfzeagle commented 4 years ago

-x HTTP Proxy address as host:port

hey.exe -n 1 -c 1 -x 127.0.0.0:8888 http://www.test.com:8060/hello error: parse 127.0.0.0:8888: first path segment in URL cannot contain colon

ringerl commented 3 years ago

Is there some workaround?

liuzhenyilang commented 3 years ago

you can try below: hey.exe -n 1 -c 1 -x http://www.test.com:8060/hello

marcwickenden commented 3 years ago

I think this is just a README issue. I've raised a PR but the value of -x should be a URL which can be parsed by net/url Parse:

https://github.com/rakyll/hey/blob/33a965eeeb7b0351b50c8e1d8de7ae50bff3d2be/hey.go#L186

i.e. http://127.0.0.1:8888.

fjfzeagle commented 3 years ago

Works fine,thank you!