Subject of the issue
The mocked request fails if the target host does not exist.
According to the doc
A request handler is triggered when the client makes a request. This occurs before anything is sent to the server
In practice it seems the host gets somehow resolved
Expected behaviour
In case of a match the request returns with value regardless the host.
Actual behaviour
Error message
502 Bad Gateway
ProtocolException('Server connection to (\'nodomain123.com\', 443) failed: Error connecting to "nodomain123.com": [Errno 111] Connection refused')
Steps to reproduce
Use the following config.
mitmproxy -s moxy.py --set mock=config/example.json
{
"request": {
"/part1/part2/part3": {
"respond": {
"content": {
"foo": 15,
"bar": "M5",
}
}
}
}
}
export https_proxy="http://127.0.0.1:8080"
curl https://nodomain123.com/part1/part2/part3 # fails
curl https://google.com/part1/part2/part3 # works
Subject of the issue
The mocked request fails if the target host does not exist.
According to the doc
A request handler is triggered when the client makes a request. This occurs before anything is sent to the server
In practice it seems the host gets somehow resolved
Expected behaviour
In case of a match the request returns with value regardless the host.
Actual behaviour
Error message
Steps to reproduce
Use the following config.
mitmproxy -s moxy.py --set mock=config/example.json