You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making HTTP requests via Hoverfly, it will ignore the scheme. I have a Python test which makes a request to "http://google.com" using the requests library, with Hoverfly set as the proxy. Before making the request, I load a JSON file containing one request-response pair, which has a scheme field set to https.
The response contains a custom Hoverfly-Cache-Served header which is absent from the response sent from google.com, allowing me to differentiate between a real and fake response.
Observed result
The response contains custom header, indicating that the request was matched (when it shouldn't).
Expected result
The response should not contain the custom header.
Additional relevant information
Hoverfly version: 1.3.1
Reproduced on OSX Mojave and Ubuntu 16 LTS.
I've set the scheme in the simulation to other things as well, and can confirm it's ignored each time.
Although the test cases uses the requests library, this is purely for easy reproduction. I originally saw this bug in a request made by Google Chrome, with Hoverfly set as an HTTP proxy.
I have a test case to reproduce the bug on the bug branch of https://github.com/kopernio/pytest-hoverfly-wrapper. To run, create a new Python virtual environment, run pip install -r requirements.txt, and ensure that the Hoverfly executable is in your PATH. Then run the test: pytest tests/test_hoverfly_wrapper.py::test_1
The text was updated successfully, but these errors were encountered:
Description of the bug
When making HTTP requests via Hoverfly, it will ignore the scheme. I have a Python test which makes a request to "http://google.com" using the
requests
library, with Hoverfly set as the proxy. Before making the request, I load a JSON file containing one request-response pair, which has ascheme
field set tohttps
.The response contains a custom
Hoverfly-Cache-Served
header which is absent from the response sent fromgoogle.com
, allowing me to differentiate between a real and fake response.Observed result
The response contains custom header, indicating that the request was matched (when it shouldn't).
Expected result
The response should not contain the custom header.
Additional relevant information
Hoverfly version: 1.3.1
Reproduced on OSX Mojave and Ubuntu 16 LTS.
I've set the scheme in the simulation to other things as well, and can confirm it's ignored each time.
Although the test cases uses the
requests
library, this is purely for easy reproduction. I originally saw this bug in a request made by Google Chrome, with Hoverfly set as an HTTP proxy.I have a test case to reproduce the bug on the
bug
branch ofhttps://github.com/kopernio/pytest-hoverfly-wrapper
. To run, create a new Python virtual environment, runpip install -r requirements.txt
, and ensure that the Hoverfly executable is in your PATH. Then run the test:pytest tests/test_hoverfly_wrapper.py::test_1
The text was updated successfully, but these errors were encountered: