haproxytech / spoa-mirror

Mirror HTTP requests using the HAProxy SPOP
GNU Lesser General Public License v2.1
40 stars 16 forks source link

Supporting GET requests #2

Closed pmichna closed 5 years ago

pmichna commented 5 years ago

The readme states:

This is a very simple program that can be used to replicate HTTP POST requests via the SPOP protocol.

Does it mean GET requests (with query parameters) can't be mirrored?

zaga00 commented 5 years ago

The program supports GET, HEAD and POST HTTP methods. Other methods could work but have not been tested.

So, GET requests (with query parameters) are supported.

pangorgo commented 5 years ago

Is there any special argument that need to passed for query parameters to be mirrored? We were testing configuration form this blog post: https://www.haproxy.com/blog/haproxy-2-0-and-beyond/#traffic-shadowing

Arguments passed: args arg_method=method arg_path=path arg_ver=req.ver arg_hdrs=req.hdrs_bin arg_body=req.body.

Unfortunately query parms were not present in mirrored request. (Pipelining was disabled as well because wew encountered some errors)

zaga00 commented 5 years ago

If you want to use the query string, then in the SPOE configuration you should use 'args .. arg_path=url ..' instead of 'args .. arg_path=path ..'

In the configuration file test/spoe.cfg, the wrong configuration is specified, which will be corrected in the following commit.

Thank you for reporting the bug.