toProxy option is broken
Created by: samcday
In the first place it's somewhat poorly documented, so perhaps I'm just doing it wrong.
Say I do this:
req.url = "http://destination/yay";
proxy.web(req, res, {
target: "http://mysquidproxy:3128",
toProxy: true
});
I should expect squidproxy:3128 to receive a GET http://destination/yay HTTP/1.1
. Instead, it receives a GET http:/destination/yay HTTP/1.1
- note the single slash after protocol. It looks like common.urlJoin
is causing the munging here.