campbellC / third-wheel

A rust implementation of a man-in-the-middle proxy
MIT License
71 stars 19 forks source link

Replace path() with path_and_query().as_str() #24

Closed EthanYidong closed 3 years ago

EthanYidong commented 3 years ago

Closes #23

I'm also unsure what the purpose of this line is in the first place. As far as I can tell, the URI that proxy clients send to the server does not need to be modified, but I'm not familiar enough with HTTP proxies to say for sure. However, sites that require queries for their API or navigation do not function properly.

campbellC commented 3 years ago

This line is there (IIRC) because of the notes in the Hyper client conn package. If this were a Hyper client it would automatically be taking a URI and dropping unnecessary pieces after a connection (If I understand the docs properly) whereas we are using the lower level conn module which is doing this after the connection already exists.

Thanks for the (second) contribution. In this case there's clearly some testing missing (which is generally true for third-wheel). I'm happy to merge this as is because the lack of testing is a much wider issue and I think a comprehensive issue should be cut for it, which I will do now.